Class BatchingClusterEventManagerImpl<K,V>
java.lang.Object
org.infinispan.notifications.cachelistener.cluster.impl.BatchingClusterEventManagerImpl<K,V>
- All Implemented Interfaces:
ClusterEventManager<K,V>
public class BatchingClusterEventManagerImpl<K,V>
extends Object
implements ClusterEventManager<K,V>
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected class -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddEvents(Object batchIdentifier, Address target, UUID identifier, Collection<ClusterEvent<K, V>> events, boolean sync) Adds additional cluster events that need to be sent remotely for an event originating locally.voiddropEvents(Object batchIdentifier) Drops and ignores all previously added events for the given identifier.sendEvents(Object batchIdentifier) Sends all previously added events for the given identifiervoidstart()
-
Constructor Details
-
BatchingClusterEventManagerImpl
public BatchingClusterEventManagerImpl()
-
-
Method Details
-
start
public void start() -
addEvents
public void addEvents(Object batchIdentifier, Address target, UUID identifier, Collection<ClusterEvent<K, V>> events, boolean sync) Description copied from interface:ClusterEventManagerAdds additional cluster events that need to be sent remotely for an event originating locally. These events are batched by thebatchIdentifierpending their submission whenClusterEventManager.sendEvents(Object)is invoked or cancelled whenClusterEventManager.dropEvents(Object)is invoked.- Specified by:
addEventsin interfaceClusterEventManager<K,V> - Parameters:
batchIdentifier- identifier for the batchtarget- The target node this event was meant foridentifier- The cluster listener that is identified for these eventsevents- The events that were generatedsync- Whether these events need to be sent synchronously or not
-
sendEvents
Description copied from interface:ClusterEventManagerSends all previously added events for the given identifier- Specified by:
sendEventsin interfaceClusterEventManager<K,V>
-
dropEvents
Description copied from interface:ClusterEventManagerDrops and ignores all previously added events for the given identifier.- Specified by:
dropEventsin interfaceClusterEventManager<K,V>
-