public final class ComputeNodePersistService extends Object
| Constructor and Description |
|---|
ComputeNodePersistService() |
| Modifier and Type | Method and Description |
|---|---|
void |
deleteInstanceLabels(String instanceId)
Delete instance labels.
|
Collection<org.apache.shardingsphere.infra.instance.ComputeNodeInstance> |
loadAllComputeNodeInstances()
Load all compute node instances.
|
org.apache.shardingsphere.infra.instance.ComputeNodeInstance |
loadComputeNodeInstance(org.apache.shardingsphere.infra.instance.definition.InstanceDefinition instanceDefinition)
Load compute node instance by instance definition.
|
Collection<org.apache.shardingsphere.infra.instance.ComputeNodeInstance> |
loadComputeNodeInstances(org.apache.shardingsphere.infra.instance.definition.InstanceType instanceType,
Collection<String> labels)
Load compute node instances by instance type and labels.
|
Collection<String> |
loadInstanceLabels(String instanceId)
Load instance labels.
|
Collection<String> |
loadInstanceStatus(String instanceId)
Load instance status.
|
Optional<Long> |
loadInstanceWorkerId(String instanceId)
Load instance worker id.
|
Optional<String> |
loadXaRecoveryId(String instanceId)
Load instance xa recovery id.
|
void |
persistInstanceLabels(String instanceId,
Collection<String> labels,
boolean isOverwrite)
Persist instance labels.
|
void |
persistInstanceWorkerId(String instanceId,
Long workerId)
Persist instance worker id.
|
void |
persistInstanceXaRecoveryId(String instanceId,
String xaRecoveryId)
Persist instance xa recovery id.
|
public void persistInstanceLabels(String instanceId, Collection<String> labels, boolean isOverwrite)
instanceId - instance idlabels - collection of labelisOverwrite - whether overwrite registry center's configuration if existedpublic void deleteInstanceLabels(String instanceId)
instanceId - instance idpublic void persistInstanceWorkerId(String instanceId, Long workerId)
instanceId - instance idworkerId - worker idpublic void persistInstanceXaRecoveryId(String instanceId, String xaRecoveryId)
instanceId - instance idxaRecoveryId - xa recovery idpublic Collection<String> loadInstanceLabels(String instanceId)
instanceId - instance idpublic Collection<String> loadInstanceStatus(String instanceId)
instanceId - instance idpublic Optional<Long> loadInstanceWorkerId(String instanceId)
instanceId - instance idpublic Optional<String> loadXaRecoveryId(String instanceId)
instanceId - instance idpublic Collection<org.apache.shardingsphere.infra.instance.ComputeNodeInstance> loadComputeNodeInstances(org.apache.shardingsphere.infra.instance.definition.InstanceType instanceType, Collection<String> labels)
instanceType - instance typelabels - collection of contained labelpublic Collection<org.apache.shardingsphere.infra.instance.ComputeNodeInstance> loadAllComputeNodeInstances()
public org.apache.shardingsphere.infra.instance.ComputeNodeInstance loadComputeNodeInstance(org.apache.shardingsphere.infra.instance.definition.InstanceDefinition instanceDefinition)
instanceDefinition - instance definitionCopyright © 2022 The Apache Software Foundation. All rights reserved.