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 Classes Modifier and Type Class Description protected static class
BatchingClusterEventManagerImpl.UnicastEventContext<K,V>
-
Constructor Summary
Constructors Constructor Description BatchingClusterEventManagerImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addEvents(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.void
dropEvents()
Drops and ignores all previously added events on this thread.void
sendEvents()
Sends all previously added events on this threadvoid
start()
-
-
-
Method Detail
-
start
public void start()
-
addEvents
public void addEvents(Address target, UUID identifier, Collection<ClusterEvent<K,V>> events, boolean sync)
Description copied from interface:ClusterEventManager
Adds additional cluster events that need to be sent remotely for an event originating locally. These events are not sent at time of registering but rather after theClusterEventManager.sendEvents()
is invoked. These events are gathered on a per thread basis and batched to reduce number of RPCs required.- Specified by:
addEvents
in interfaceClusterEventManager<K,V>
- Parameters:
target
- 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
public void sendEvents()
Description copied from interface:ClusterEventManager
Sends all previously added events on this thread- Specified by:
sendEvents
in interfaceClusterEventManager<K,V>
-
dropEvents
public void dropEvents()
Description copied from interface:ClusterEventManager
Drops and ignores all previously added events on this thread.- Specified by:
dropEvents
in interfaceClusterEventManager<K,V>
-
-