public class PartitionWanEventContainer extends Object
| Constructor and Description |
|---|
PartitionWanEventContainer() |
| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
void |
drainRandomWanQueue(Collection<com.hazelcast.wan.WanReplicationEvent> drainTo,
int elementsToDrain)
Removes at most the given number of available elements from a random WAN
queue and adds them to the given collection.
|
PartitionWanEventQueueMap |
getCacheEventQueueMapByBackupCount(int backupCount) |
PartitionWanEventQueueMap |
getMapEventQueueMapByBackupCount(int backupCount) |
com.hazelcast.wan.WanReplicationEvent |
pollCacheWanEvent(String cacheName)
Return the head of the wan event queue for the
cacheName |
com.hazelcast.wan.WanReplicationEvent |
pollMapWanEvent(String mapName)
Return the head of the wan event queue for the
mapName |
boolean |
publishCacheWanEvent(String cacheName,
com.hazelcast.wan.WanReplicationEvent wanReplicationEvent)
Publishes the
replicationEvent for the given cacheName
cache on the partition partitionId |
boolean |
publishMapWanEvent(String mapName,
com.hazelcast.wan.WanReplicationEvent wanReplicationEvent)
Publishes the
replicationEvent for the given mapName
map on the partition partitionId |
int |
size() |
public boolean publishMapWanEvent(String mapName, com.hazelcast.wan.WanReplicationEvent wanReplicationEvent)
replicationEvent for the given mapName
map on the partition partitionIdmapName - the name of the map for which the event is
publishedwanReplicationEvent - the published replication eventtrue if the element was added to this queue, else
falsepublic com.hazelcast.wan.WanReplicationEvent pollMapWanEvent(String mapName)
mapNamemapName - the map for which an event is polledpublic com.hazelcast.wan.WanReplicationEvent pollCacheWanEvent(String cacheName)
cacheNamecacheName - the cache for which an event is polledpublic void drainRandomWanQueue(Collection<com.hazelcast.wan.WanReplicationEvent> drainTo, int elementsToDrain)
drainTo - the collection to which to drain events toelementsToDrain - the maximum number of events to drainpublic int size()
public PartitionWanEventQueueMap getMapEventQueueMapByBackupCount(int backupCount)
public PartitionWanEventQueueMap getCacheEventQueueMapByBackupCount(int backupCount)
public boolean publishCacheWanEvent(String cacheName, com.hazelcast.wan.WanReplicationEvent wanReplicationEvent)
replicationEvent for the given cacheName
cache on the partition partitionIdcacheName - the name of the cache for which the event is
publishedwanReplicationEvent - the published replication eventtrue if the element was added to this queue, else
falsepublic void clear()
Copyright © 2020 Hazelcast, Inc.. All Rights Reserved.