Interface ClusterMetadataProvider
- 
- All Superinterfaces:
 Provider
public interface ClusterMetadataProvider extends Provider
Abstraction of acluster metadataprovider. 
- 
- 
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddActivePartitionMember(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.booleanisAvailable()Tells if this provider is currently available and therefore can provide ClusterMetadata.voidremoveActivePartitionMember(PartitionId partitionId, NodeId nodeId)Removes a controller node from the list of active members for a partition.voidsetClusterMetadata(ClusterMetadata metadata)Updates cluster metadata. 
 - 
 
- 
- 
Method Detail
- 
isAvailable
boolean isAvailable()
Tells if this provider is currently available and therefore can provide ClusterMetadata.- Returns:
 trueif this provider is available and can provide cluster metadata.
 
- 
getClusterMetadata
Versioned<ClusterMetadata> getClusterMetadata()
Returns the current cluster metadata.- Returns:
 - cluster metadata
 
 
- 
setClusterMetadata
void setClusterMetadata(ClusterMetadata metadata)
Updates cluster metadata.- Parameters:
 metadata- new metadata
 
- 
addActivePartitionMember
void addActivePartitionMember(PartitionId partitionId, NodeId nodeId)
Adds a controller node to the list of active members for a partition.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.
- Parameters:
 partitionId- partition identifiernodeId- identifier of controller node
 
- 
removeActivePartitionMember
void removeActivePartitionMember(PartitionId partitionId, NodeId nodeId)
Removes a controller node from the list of active members for a partition.- Parameters:
 partitionId- partition identifiernodeId- identifier of controller node
 
- 
getActivePartitionMembers
Set<NodeId> getActivePartitionMembers(PartitionId partitionId)
Returns the set of controller nodes that are the active members for a partition.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.
- Parameters:
 partitionId- partition identifier- Returns:
 - identifiers of controller nodes that are active members
 
 
 - 
 
 -