Interface CacheRuntimeConfiguration<K,V>

Type Parameters:
K - the key type for the cache
V - the value type for the cache
All Superinterfaces:
CacheConfiguration<K,V>

public interface CacheRuntimeConfiguration<K,V> extends CacheConfiguration<K,V>
Represents the configuration currently used by a Cache.

It only exposes mutative operations for attributes that can be changed on an AVAILABLE Cache instance.

  • Method Details

    • registerCacheEventListener

      void registerCacheEventListener(CacheEventListener<? super K,? super V> listener, EventOrdering ordering, EventFiring firing, Set<EventType> forEventTypes)
      Registers a CacheEventListener on the cache.

      The registered listener will be configured according to the provided EventOrdering, EventFiring and EventType set.

      Registering a listener will cause the eventing subsystem to start.

      Parameters:
      listener - the listener instance to register
      ordering - the EventOrdering required by this listener
      firing - the EventFiring required by this listener
      forEventTypes - the set of EventTypes for which this listener is to be registered
      Throws:
      IllegalStateException - if the listener is already registered
    • registerCacheEventListener

      default void registerCacheEventListener(CacheEventListener<? super K,? super V> listener, EventOrdering ordering, EventFiring firing, EventType eventType, EventType... eventTypes)
      Registers a CacheEventListener on the cache.

      The registered listener will be configured according to the provided EventOrdering, EventFiring and EventTypes.

      Registering a listener will cause the eventing subsystem to start.

      Parameters:
      listener - the listener instance to register
      ordering - the EventOrdering required by this listener
      firing - the EventFiring required by this listener
      eventType - the EventType for which this listener is to be registered
      eventTypes - additional EventTypes for which this listener is to be registered
      Throws:
      IllegalStateException - if the listener is already registered
    • deregisterCacheEventListener

      void deregisterCacheEventListener(CacheEventListener<? super K,? super V> listener)
      Deregisters a previously registered CacheEventListener instance.

      Deregistering all listeners will cause the eventing subsystem to stop.

      Parameters:
      listener - the listener to deregister
      Throws:
      IllegalStateException - if the listener is not registered
    • updateResourcePools

      void updateResourcePools(ResourcePools pools)
      Updates the ResourcePools used by the Cache.
      Parameters:
      pools - the ResourcePools that need to be updated