Class CacheDispatcherImpl
java.lang.Object
com.evolveum.midpoint.repo.cache.registry.CacheDispatcherImpl
- All Implemented Interfaces:
CacheDispatcher
Dispatches cache-related events - mainly invalidation ones - to all relevant listeners:
CacheRegistry (grouping local caches) and ClusterCacheListener (for
inter-node distribution).
Could be reworked in the future.
Note that this class resides in repo-cache module almost by accident and perhaps should be moved to a more appropriate place.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<O extends ObjectType>
voiddispatchInvalidation(Class<O> type, String oid, boolean clusterwide, @Nullable CacheInvalidationContext context) Dispatches "cache entry/entries invalidation" event to all relevant caches, even clusterwide if requested so.voidregisterCacheInvalidationListener(CacheInvalidationListener cacheListener) voidunregisterCacheInvalidationListener(CacheInvalidationListener cacheListener) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.evolveum.midpoint.repo.api.CacheDispatcher
registerCacheListener, unregisterCacheListener
-
Constructor Details
-
CacheDispatcherImpl
public CacheDispatcherImpl()
-
-
Method Details
-
registerCacheInvalidationListener
- Specified by:
registerCacheInvalidationListenerin interfaceCacheDispatcher
-
unregisterCacheInvalidationListener
- Specified by:
unregisterCacheInvalidationListenerin interfaceCacheDispatcher
-
dispatchInvalidation
public <O extends ObjectType> void dispatchInvalidation(Class<O> type, String oid, boolean clusterwide, @Nullable @Nullable CacheInvalidationContext context) Description copied from interface:CacheDispatcherDispatches "cache entry/entries invalidation" event to all relevant caches, even clusterwide if requested so.- Specified by:
dispatchInvalidationin interfaceCacheDispatcher- Parameters:
type- Type of object(s) to be invalidated. Null means 'all types' (implies oid is null as well).oid- Object(s) to be invalidated. Null means 'all objects of given type(s)'.clusterwide- True if the event has to be distributed clusterwide.context- Context of the invalidation request (optional).
-