@Service public class PartitionManager extends AbstractListenerManager<PartitionEvent,PartitionEventListener> implements PartitionService, PartitionAdminService
PartitionService and PartitionAdminService.| Modifier and Type | Field and Description |
|---|---|
protected ClusterService |
clusterService |
protected MessagingService |
messagingService |
protected ClusterMetadataService |
metadataService |
eventDispatcher, listenerRegistry| Constructor and Description |
|---|
PartitionManager() |
| Modifier and Type | Method and Description |
|---|---|
void |
activate() |
void |
deactivate() |
Set<NodeId> |
getActiveMembersMembers(PartitionId partitionId)
Returns the set of controller nodes that are the current active members of a partition.
|
Set<PartitionId> |
getAllPartitionIds()
Returns the identifiers of all partitions.
|
Set<NodeId> |
getConfiguredMembers(PartitionId partitionId)
Returns the set of controller nodes configured to be members of a partition.
|
DistributedPrimitiveCreator |
getDistributedPrimitiveCreator(PartitionId partitionId)
Returns a DistributedPrimitiveCreator that can create primitives hosted on a partition.
|
int |
getNumberOfPartitions()
Returns the total number of partitions.
|
List<PartitionClientInfo> |
partitionClientInfo()
Returns the
information for partition clients. |
List<PartitionInfo> |
partitionInfo()
Returns the
information for existing partitions. |
addListener, post, removeListenerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddListener, removeListener@Reference(cardinality=MANDATORY_UNARY) protected MessagingService messagingService
@Reference(cardinality=MANDATORY_UNARY) protected ClusterMetadataService metadataService
@Reference(cardinality=MANDATORY_UNARY) protected ClusterService clusterService
@Activate public void activate()
@Deactivate public void deactivate()
public int getNumberOfPartitions()
PartitionServicegetNumberOfPartitions in interface PartitionServicepublic Set<PartitionId> getAllPartitionIds()
PartitionServicegetAllPartitionIds in interface PartitionServicepublic DistributedPrimitiveCreator getDistributedPrimitiveCreator(PartitionId partitionId)
PartitionServicegetDistributedPrimitiveCreator in interface PartitionServicepartitionId - partition identifierpublic Set<NodeId> getConfiguredMembers(PartitionId partitionId)
PartitionServicegetConfiguredMembers in interface PartitionServicepartitionId - partition identifierpublic Set<NodeId> getActiveMembersMembers(PartitionId partitionId)
PartitionServicegetActiveMembersMembers in interface PartitionServicepartitionId - partition identifierpublic List<PartitionInfo> partitionInfo()
PartitionAdminServiceinformation for existing partitions.partitionInfo in interface PartitionAdminServicePartitionInfopublic List<PartitionClientInfo> partitionClientInfo()
PartitionAdminServiceinformation for partition clients.partitionClientInfo in interface PartitionAdminServicePartitionClientInfo