Skip to content

Commit

Permalink
Rename to CallbackRegistry
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisspyB committed Jan 14, 2025
1 parent b10d205 commit 2acd0cf
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/fdb5/api/FDBFactory.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class FDBToolRequest;

/// The base class that FDB implementations are derived from

class FDBBase : private eckit::NonCopyable, public CallbackInterface {
class FDBBase : private eckit::NonCopyable, public CallbackRegistry {

public: // methods

Expand Down
10 changes: 5 additions & 5 deletions src/fdb5/api/helpers/Callback.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,20 @@
namespace fdb5 {

class FDB;
class CallbackInterface;
class CallbackRegistry;

using ArchiveCallback = std::function<void(const Key& key, const void* data, size_t length, std::future<std::shared_ptr<const FieldLocation>>)>;
using FlushCallback = std::function<void()>;
using ConstructorCallback = std::function<void(CallbackInterface&)>;
using ConstructorCallback = std::function<void(CallbackRegistry&)>;

static const ArchiveCallback CALLBACK_ARCHIVE_NOOP = [](const Key& key, const void* data, size_t length, std::future<std::shared_ptr<const FieldLocation>>) {};
static const ArchiveCallback CALLBACK_ARCHIVE_NOOP = [](auto&&...) {};
static const FlushCallback CALLBACK_FLUSH_NOOP = []() {};
static const ConstructorCallback CALLBACK_CONSTRUCTOR_NOOP = [](CallbackInterface&) {};
static const ConstructorCallback CALLBACK_CONSTRUCTOR_NOOP = [](auto&&...) {};

// -------------------------------------------------------------------------------------------------

// This class provides a common interface for registering callbacks with an FDB object or a Store/Catalogue Handler.
class CallbackInterface {
class CallbackRegistry {
public:

void registerFlushCallback(FlushCallback callback) {flushCallback_ = callback;}
Expand Down
2 changes: 1 addition & 1 deletion src/fdb5/remote/server/StoreHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ struct StoreHelper {
};

//----------------------------------------------------------------------------------------------------------------------
class StoreHandler : public ServerConnection, public CallbackInterface {
class StoreHandler : public ServerConnection, public CallbackRegistry {
public: // methods

StoreHandler(eckit::net::TCPSocket& socket, const Config& config);
Expand Down

0 comments on commit 2acd0cf

Please sign in to comment.