@ProviderType
public interface InstanceDescription
Note that all methods are idempotent - they always return the same values on subsequent calls. Rather, on any change new InstanceDescriptions are created.
TopologyView
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
PROPERTY_DESCRIPTION
Property containing a description for the instance.
|
static java.lang.String |
PROPERTY_ENDPOINTS
Property containing endpoints to connect to the instance.
|
static java.lang.String |
PROPERTY_NAME
Property containing a name for the instance.
|
Modifier and Type | Method and Description |
---|---|
ClusterView |
getClusterView()
Returns the ClusterView of which this instance is part of.
|
java.util.Map<java.lang.String,java.lang.String> |
getProperties()
Returns a Map containing all properties of this instance.
|
java.lang.String |
getProperty(java.lang.String name)
Returns the value of a particular property.
|
java.lang.String |
getSlingId()
The identifier of the running Sling instance.
|
boolean |
isLeader()
If an instance is part of a cluster, it can potentially be a leader of that cluster -
this information is queried here.
|
boolean |
isLocal()
Determines whether this InstanceDescription is representing the local instance.
|
static final java.lang.String PROPERTY_NAME
static final java.lang.String PROPERTY_DESCRIPTION
static final java.lang.String PROPERTY_ENDPOINTS
ClusterView getClusterView()
Every instance is part of a ClusterView even if it is standalone.
boolean isLeader()
If an instance is not part of a cluster, this method returns true.
Only one instance of a cluster is guaranteed to be the leader at any time. This guarantee is provided by this service. If the leader goes down, the service elects a new leader and announces it to TopologyEventListener listeners.
boolean isLocal()
java.lang.String getSlingId()
java.lang.String getProperty(java.lang.String name)
Note that there are no hard guarantees or requirements as to how quickly a property is available once it is set on a distant instance.
name
- The property namenull
DiscoveryService#setProperty(String, String)
java.util.Map<java.lang.String,java.lang.String> getProperties()
Copyright © 2010 - 2020 Adobe. All Rights Reserved