Package com.hazelcast.cp
Class CPGroupsSnapshot
java.lang.Object
com.hazelcast.cp.CPGroupsSnapshot
Represents an immutable snapshot of the current CP groups view
from 1 member of the Hazelcast cluster. This snapshot object is
used to share views between members and clients.
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionstatic final CPGroupsSnapshot
An empty snapshot for use when there is no data to provide -
Constructor Summary
ConstructorDescriptionCPGroupsSnapshot
(Map<CPGroupId, CPGroupsSnapshot.GroupInfo> groupIdToInfo) Create a newCPGroupsSnapshot
without any CP to AP UUID mapping.CPGroupsSnapshot
(Map<CPGroupId, CPGroupsSnapshot.GroupInfo> groupIdToInfo, Map<UUID, UUID> cpToApUuids) Create a newCPGroupsSnapshot
with included CP to AP UUID mapping. -
Method Summary
-
Field Details
-
EMPTY
An empty snapshot for use when there is no data to provide
-
-
Constructor Details
-
CPGroupsSnapshot
public CPGroupsSnapshot(Map<CPGroupId, CPGroupsSnapshot.GroupInfo> groupIdToInfo, Map<UUID, UUID> cpToApUuids) Create a newCPGroupsSnapshot
with included CP to AP UUID mapping. This means AP UUIDs can be looked up directly from this snapshot without needing to query the cluster service.- Parameters:
groupIdToInfo
- mapping ofCPGroupId
toCPGroupsSnapshot.GroupInfo
cpToApUuids
- mapping of last known CPUUID
to APUUID
for members in this group
-
CPGroupsSnapshot
Create a newCPGroupsSnapshot
without any CP to AP UUID mapping. This means AP UUIDs will need to be looked up separately if they are required.- Parameters:
groupIdToInfo
- mapping ofCPGroupId
toCPGroupsSnapshot.GroupInfo
-
-
Method Details