public interface ClusterView
'Seeing each other'/A cluster refers to being hooked to the same underlying persistence layer/jcr repository.
A ClusterView can also consist of just one single instance.
All instances in a cluster must and do have a unique sling.id.
InstanceDescription.getSlingId()
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getId()
Returns a stable id of the cluster represented by this
cluster view.
|
java.util.List<InstanceDescription> |
getInstances()
Provides the list of InstanceDescriptions with a stable ordering.
|
InstanceDescription |
getLeader()
Provides the InstanceDescription belonging to the leader instance.
|
java.lang.String getId()
Similar to the SlingID, this id is persisted and thus remains stable accross instance/cluster restarts.
When an instance joins a cluster, it will inherit the id from the joined cluster (thus incurs a cluster id change).
Note: When instances part from a cluster (eg due to a network partitioning) the cluster id is retained. This results in potentially multiple clusters with the same id. This fact could be used to detect such partitioning/split brain situations. It also implies though that the cluster id is not guaranteed to be unique in a topology!
Addition in 1.0.4: this id must consist only of alphanumeric characters plus dash '-' and underscore '_'.
java.util.List<InstanceDescription> getInstances()
Stable ordering implies that unless an instance leaves the cluster (due to shutdown/crash/network problems) the instance keeps the relative position in the list.
InstanceDescription getLeader()
Every ClusterView is guaranteed to have one and only one leader.
The leader is stable: once a leader is elected it stays leader unless it leaves the cluster (due to shutdown/crash/network problems)
"Copyright © 2010 - 2020 Adobe Systems Incorporated. All Rights Reserved"