public class PublisherQueueContainer extends Object
| Constructor and Description |
|---|
PublisherQueueContainer(com.hazelcast.instance.Node node) |
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clears all WAN queues in all containers.
|
int |
drainCacheQueues(int partitionId)
Drains all the cache queues maintained for the given partition.
|
int |
drainMapQueues(int partitionId)
Drains all the map queues maintained for the given partition.
|
Map<Integer,Integer> |
drainQueues()
Drains all the queues stored in this container and returns the
total of the drained elements in a map, per partition.
|
PartitionWanEventContainer |
getPublisherEventQueue(int partitionId)
Returns the
PartitionWanEventContainer for the specified
partitionId. |
Map<Integer,PartitionWanEventContainer> |
getPublisherEventQueueMap()
Returns the map of partition ID to
PartitionWanEventContainer
for the specific partition |
com.hazelcast.wan.WanReplicationEvent |
pollCacheWanEvent(String nameWithPrefix,
int partitionId)
Polls the wan event queue for the cache with the name
nameWithPrefix on partition partitionId. |
com.hazelcast.wan.WanReplicationEvent |
pollMapWanEvent(String mapName,
int partitionId)
Polls the wan event queue for the map with the name
mapName on
partition partitionId. |
com.hazelcast.wan.WanReplicationEvent |
pollRandomWanEvent(int partitionId)
Returns a random replication event for the
partitionId. |
boolean |
publishCacheWanEvent(String nameWithPrefix,
int partitionId,
com.hazelcast.wan.WanReplicationEvent replicationEvent)
Publishes the
replicationEvent for the cache with the name
nameWithPrefix on the partition partitionId. |
boolean |
publishMapWanEvent(String mapName,
int partitionId,
com.hazelcast.wan.WanReplicationEvent replicationEvent)
Publishes the
replicationEvent for the given mapName
map on the partition partitionId |
int |
size(int partitionId)
Returns the size of all WAN queues for the given
partitionId. |
public PublisherQueueContainer(com.hazelcast.instance.Node node)
public com.hazelcast.wan.WanReplicationEvent pollCacheWanEvent(String nameWithPrefix, int partitionId)
nameWithPrefix on partition partitionId.nameWithPrefix - the cache namepartitionId - the partition of the wan eventpublic boolean publishCacheWanEvent(String nameWithPrefix, int partitionId, com.hazelcast.wan.WanReplicationEvent replicationEvent)
replicationEvent for the cache with the name
nameWithPrefix on the partition partitionId.nameWithPrefix - the cache namepartitionId - the partition ID for the published eventreplicationEvent - the published replication eventtrue if the element was added to this queue, else falsepublic com.hazelcast.wan.WanReplicationEvent pollMapWanEvent(String mapName, int partitionId)
mapName on
partition partitionId.mapName - the map namepartitionId - the partition of the wan eventpublic boolean publishMapWanEvent(String mapName, int partitionId, com.hazelcast.wan.WanReplicationEvent replicationEvent)
replicationEvent for the given mapName
map on the partition partitionIdmapName - the name of the map for which the event is
publishedpartitionId - the partition ID for the published eventreplicationEvent - the published replication eventtrue if the element was added to this queue, else
falsepublic com.hazelcast.wan.WanReplicationEvent pollRandomWanEvent(int partitionId)
partitionId.partitionId - the partition ID for the replication eventpublic Map<Integer,PartitionWanEventContainer> getPublisherEventQueueMap()
PartitionWanEventContainer
for the specific partitionpublic PartitionWanEventContainer getPublisherEventQueue(int partitionId)
PartitionWanEventContainer for the specified
partitionId.partitionId - the partition ID for the WAN event containerpublic int size(int partitionId)
partitionId.partitionId - the partition IDpublic Map<Integer,Integer> drainQueues()
public int drainMapQueues(int partitionId)
partitionId - the partition ID for which queues need to be drainedpublic int drainCacheQueues(int partitionId)
partitionId - the partition ID for which queues need to be drainedpublic void clear()
Copyright © 2020 Hazelcast, Inc.. All Rights Reserved.