public class GridAffinityAssignmentV2 extends IgniteDataTransferObject implements AffinityAssignment
V1, V2, V3, V4, V5IGNITE_AFFINITY_BACKUPS_THRESHOLD, IGNITE_DISABLE_AFFINITY_MEMORY_OPTIMIZATION| Constructor and Description |
|---|
GridAffinityAssignmentV2()
Default constructor for deserialization.
|
GridAffinityAssignmentV2(AffinityTopologyVersion topVer,
List<List<ClusterNode>> assignment,
List<List<ClusterNode>> idealAssignment) |
| Modifier and Type | Method and Description |
|---|---|
List<List<ClusterNode>> |
assignment() |
Set<Integer> |
backupPartitions(UUID nodeId)
Get backup partitions for specified node ID.
|
boolean |
equals(Object o) |
List<ClusterNode> |
get(int part)
Get affinity nodes for partition.
|
Collection<UUID> |
getIds(int part)
Get affinity node IDs for partition as unmodifiable collection.
|
int |
hashCode() |
List<List<ClusterNode>> |
idealAssignment() |
Set<ClusterNode> |
nodes() |
Set<Integer> |
partitionPrimariesDifferentToIdeal() |
Set<ClusterNode> |
primaryPartitionNodes() |
Set<Integer> |
primaryPartitions(UUID nodeId)
Get primary partitions for specified node ID.
|
protected void |
readExternalData(byte protoVer,
ObjectInput in)
Load object's specific data content.
|
AffinityTopologyVersion |
topologyVersion() |
String |
toString() |
protected void |
writeExternalData(ObjectOutput out)
Save object's specific data content.
|
getProtocolVersion, readExternal, toList, toSet, writeExternalclone, finalize, getClass, notify, notifyAll, wait, wait, waitassignments2idspublic GridAffinityAssignmentV2()
public GridAffinityAssignmentV2(AffinityTopologyVersion topVer, List<List<ClusterNode>> assignment, List<List<ClusterNode>> idealAssignment)
topVer - Topology version.assignment - Assignment.idealAssignment - Ideal assignment.public List<List<ClusterNode>> idealAssignment()
idealAssignment in interface AffinityAssignmentpublic List<List<ClusterNode>> assignment()
assignment in interface AffinityAssignmentpublic AffinityTopologyVersion topologyVersion()
topologyVersion in interface AffinityAssignmentpublic List<ClusterNode> get(int part)
get in interface AffinityAssignmentpart - Partition.public Collection<UUID> getIds(int part)
getIds in interface AffinityAssignmentpart - Partition.public Set<ClusterNode> nodes()
nodes in interface AffinityAssignmentpublic Set<ClusterNode> primaryPartitionNodes()
primaryPartitionNodes in interface AffinityAssignmentpublic Set<Integer> primaryPartitions(UUID nodeId)
primaryPartitions in interface AffinityAssignmentnodeId - Node ID to get primary partitions for.public Set<Integer> backupPartitions(UUID nodeId)
backupPartitions in interface AffinityAssignmentnodeId - Node ID to get backup partitions for.public Set<Integer> partitionPrimariesDifferentToIdeal()
partitionPrimariesDifferentToIdeal in interface AffinityAssignmentprotected void writeExternalData(ObjectOutput out) throws IOException
writeExternalData in class IgniteDataTransferObjectout - Output object to write data content.IOException - If I/O errors occur.protected void readExternalData(byte protoVer,
ObjectInput in)
throws IOException,
ClassNotFoundException
readExternalData in class IgniteDataTransferObjectprotoVer - Input object version.in - Input object to load data content.IOException - If I/O errors occur.ClassNotFoundException - If the class for an object being restored cannot be found.
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.8.0 Release Date : February 27 2020