Class CacheDispatcherImpl
- java.lang.Object
 - 
- com.evolveum.midpoint.repo.cache.registry.CacheDispatcherImpl
 
 
- 
- All Implemented Interfaces:
 CacheDispatcher
@Component public class CacheDispatcherImpl extends Object implements 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 Constructor Description CacheDispatcherImpl() 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <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.voidregisterCacheListener(CacheListener cacheListener)voidunregisterCacheListener(CacheListener cacheListener) 
 - 
 
- 
- 
Method Detail
- 
registerCacheListener
public void registerCacheListener(CacheListener cacheListener)
- Specified by:
 registerCacheListenerin interfaceCacheDispatcher
 
- 
unregisterCacheListener
public void unregisterCacheListener(CacheListener cacheListener)
- Specified by:
 unregisterCacheListenerin 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).
 
 - 
 
 -