public interface ClusterMetadataProvider extends Provider
cluster metadata provider.| Modifier and Type | Method and Description | 
|---|---|
void | 
addActivePartitionMember(PartitionId partitionId,
                        NodeId nodeId)
Adds a controller node to the list of active members for a partition. 
 | 
Set<NodeId> | 
getActivePartitionMembers(PartitionId partitionId)
Returns the set of controller nodes that are the active members for a partition. 
 | 
Versioned<ClusterMetadata> | 
getClusterMetadata()
Returns the current cluster metadata. 
 | 
boolean | 
isAvailable()
Tells if this provider is currently available and therefore can provide ClusterMetadata. 
 | 
void | 
removeActivePartitionMember(PartitionId partitionId,
                           NodeId nodeId)
Removes a controller node from the list of active members for a partition. 
 | 
void | 
setClusterMetadata(ClusterMetadata metadata)
Updates cluster metadata. 
 | 
boolean isAvailable()
true if this provider is available and can provide cluster metadata.Versioned<ClusterMetadata> getClusterMetadata()
void setClusterMetadata(ClusterMetadata metadata)
metadata - new metadatavoid addActivePartitionMember(PartitionId partitionId, NodeId nodeId)
Active members of a partition are those that are actively participating in the data replication protocol being employed. When a node first added to a partition, it is in a passive or catch up mode where it attempts to bring it self up to speed with other active members in the partition.
partitionId - partition identifiernodeId - identifier of controller nodevoid removeActivePartitionMember(PartitionId partitionId, NodeId nodeId)
partitionId - partition identifiernodeId - identifier of controller nodeSet<NodeId> getActivePartitionMembers(PartitionId partitionId)
Active members of a partition are typically those that are actively participating in the data replication protocol being employed. When a node first added to a partition, it is in a passive or catch up mode where it attempts to bring it self up to speed with other active members in the partition.
Note:If is possible for this list to different from the list of partition members specified by cluster meta data. The discrepancy can arise due to the fact that adding/removing members from a partition requires a data hand-off mechanism to complete.
partitionId - partition identifier