public class StoragePartition extends Object implements Managed<StoragePartition>
| Modifier and Type | Field and Description |
|---|---|
static Collection<io.atomix.resource.ResourceType> |
RESOURCE_TYPES |
| Constructor and Description |
|---|
StoragePartition(Partition partition,
MessagingService messagingService,
ClusterService clusterService,
io.atomix.catalyst.serializer.Serializer serializer,
Executor sharedExecutor,
File logFolder) |
| Modifier and Type | Method and Description |
|---|---|
StoragePartitionClient |
client()
Returns the partition client instance.
|
CompletableFuture<Void> |
close()
Closes the managed object.
|
PartitionId |
getId()
Returns the identifier of the
partition associated with this instance. |
Collection<io.atomix.catalyst.transport.Address> |
getMemberAddresses()
Returns the
addresses of partition members. |
Collection<NodeId> |
getMembers()
Returns the identifiers of partition members.
|
Optional<PartitionInfo> |
info()
Returns the partition information if this partition is locally managed i.e.
|
boolean |
isOpen()
Return
true if the managed object is open. |
CompletableFuture<Void> |
leaveCluster()
Closes the partition server if it was previously opened.
|
void |
onUpdate(Partition newValue)
Process updates to partitions and handles joining or leaving a partition.
|
CompletableFuture<Void> |
open()
Opens the managed object.
|
public static final Collection<io.atomix.resource.ResourceType> RESOURCE_TYPES
public StoragePartition(Partition partition, MessagingService messagingService, ClusterService clusterService, io.atomix.catalyst.serializer.Serializer serializer, Executor sharedExecutor, File logFolder)
public StoragePartitionClient client()
public CompletableFuture<Void> open()
Managedopen in interface Managed<StoragePartition>public CompletableFuture<Void> close()
Managedclose in interface Managed<StoragePartition>public PartitionId getId()
partition associated with this instance.public Collection<NodeId> getMembers()
public Collection<io.atomix.catalyst.transport.Address> getMemberAddresses()
addresses of partition members.public CompletableFuture<Void> leaveCluster()
public boolean isOpen()
Managedtrue if the managed object is open.isOpen in interface Managed<StoragePartition>true if openpublic Optional<PartitionInfo> info()
public void onUpdate(Partition newValue)
newValue - new Partition