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
-
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.void
registerCacheInvalidationListener
(CacheInvalidationListener cacheListener) void
unregisterCacheInvalidationListener
(CacheInvalidationListener cacheListener) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.evolveum.midpoint.repo.api.CacheDispatcher
registerCacheListener, unregisterCacheListener
-
Constructor Details
-
CacheDispatcherImpl
public CacheDispatcherImpl()
-
-
Method Details
-
registerCacheInvalidationListener
- Specified by:
registerCacheInvalidationListener
in interfaceCacheDispatcher
-
unregisterCacheInvalidationListener
- Specified by:
unregisterCacheInvalidationListener
in interfaceCacheDispatcher
-
dispatchInvalidation
public <O extends ObjectType> void dispatchInvalidation(Class<O> type, String oid, boolean clusterwide, @Nullable @Nullable CacheInvalidationContext context) Description copied from interface:CacheDispatcher
Dispatches "cache entry/entries invalidation" event to all relevant caches, even clusterwide if requested so.- Specified by:
dispatchInvalidation
in 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).
-