1.1 --- a/libfsserver/include/fsserver/file_paging.h Fri Sep 10 00:49:32 2021 +0200
1.2 +++ b/libfsserver/include/fsserver/file_paging.h Fri Sep 10 23:16:41 2021 +0200
1.3 @@ -24,7 +24,7 @@
1.4 #include <map>
1.5 #include <mutex>
1.6
1.7 -#include <fsserver/file_notification.h>
1.8 +#include <fsserver/file_notifier_registry.h>
1.9 #include <fsserver/file_opening.h>
1.10 #include <fsserver/page_mapper.h>
1.11 #include <fsserver/pager.h>
1.12 @@ -37,11 +37,6 @@
1.13 typedef std::map<fileid_t, PageMapper *> FileMapping;
1.14 typedef std::pair<fileid_t, PageMapper *> FileMappingEntry;
1.15
1.16 -/* Mapping type from file identifiers to notification managers. */
1.17 -
1.18 -typedef std::map<fileid_t, FileNotification *> FileNotifiers;
1.19 -typedef std::map<fileid_t, FileNotification *> FileNotifierEntry;
1.20 -
1.21
1.22
1.23 /* A registry of mappers for accessors. */
1.24 @@ -50,8 +45,8 @@
1.25 {
1.26 protected:
1.27 Pages *_pages;
1.28 + FileNotifierRegistry *_notifiers;
1.29 FileMapping _mappers;
1.30 - FileNotifiers _notifiers;
1.31 std::mutex _lock;
1.32
1.33 /* Mapper registry access. */
1.34 @@ -68,14 +63,8 @@
1.35
1.36 long get_mapper(FileOpening *opening, const char *path, flags_t flags, fileid_t fileid, PageMapper **mapper);
1.37
1.38 - /* Notification manager access. */
1.39 -
1.40 - FileNotification *get_notifier(fileid_t fileid);
1.41 -
1.42 - void remove(fileid_t fileid, FileNotification *notifier);
1.43 -
1.44 public:
1.45 - explicit FilePaging(Pages *pages);
1.46 + explicit FilePaging(Pages *pages, FileNotifierRegistry *notifiers);
1.47
1.48 /* Pager initialisation methods. */
1.49