Class ProcessorStore<T extends HasMetadata>

    • Method Detail

      • add

        public void add​(T obj)
      • update

        public void update​(List<T> items)
      • update

        public void update​(T obj)
      • delete

        public void delete​(T obj)
      • list

        public List<T> list()
      • get

        public T get​(T object)
      • getByKey

        public T getByKey​(String key)
      • syncList

        public boolean syncList​(Set<String> nextKeys)
        Syncs the cache with the given set of keys from the latest list operation. Emits deferred add notifications if this is the first sync, and emits delete notifications for any cached items whose keys are not in nextKeys.
        Parameters:
        nextKeys - the set of keys from the latest list result
        Returns:
        true if the cache was empty before processing deletions, false otherwise
      • onList

        public Executor onList​(String resourceVersion,
                               boolean remainedEmpty)
        Distributes the onList event to all registered handlers and returns the serial executor used for event processing. Callers can use the returned executor to schedule work that must run after all handler notifications have been processed.
        Parameters:
        resourceVersion - the latest resource version known to the list operation
        remainedEmpty - true if the cache was empty both before and after the list operation
        Returns:
        the serial executor that processes handler notifications
      • getKey

        public String getKey​(T obj)
      • resync

        public void resync()