Class DefaultInstanceDescription
java.lang.Object
org.apache.sling.discovery.commons.providers.DefaultInstanceDescription
- All Implemented Interfaces:
org.apache.sling.discovery.InstanceDescription
- Direct Known Subclasses:
NonLocalInstanceDescription
public class DefaultInstanceDescription
extends Object
implements org.apache.sling.discovery.InstanceDescription
Base implementation for the InstanceDescription interface.
Allows creation of the object with clusterview and/or properties null - to be set later but before usage!
-
Field Summary
Fields inherited from interface org.apache.sling.discovery.InstanceDescription
PROPERTY_DESCRIPTION, PROPERTY_ENDPOINTS, PROPERTY_NAME
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultInstanceDescription
(DefaultClusterView clusterView, boolean isLeader, boolean isOwn, String slingId, Map<String, String> properties) -
Method Summary
Modifier and TypeMethodDescriptionboolean
org.apache.sling.discovery.ClusterView
getProperty
(String name) int
hashCode()
boolean
isLeader()
boolean
isLocal()
protected void
setProperties
(Map<String, String> properties) Sets the properties of this instancevoid
setProperty
(String key, String value) for testing only!toString()
-
Constructor Details
-
DefaultInstanceDescription
public DefaultInstanceDescription(DefaultClusterView clusterView, boolean isLeader, boolean isOwn, String slingId, Map<String, String> properties)
-
-
Method Details
-
toString
-
hashCode
public int hashCode() -
equals
-
getClusterView
public org.apache.sling.discovery.ClusterView getClusterView()- Specified by:
getClusterView
in interfaceorg.apache.sling.discovery.InstanceDescription
-
isLeader
public boolean isLeader()- Specified by:
isLeader
in interfaceorg.apache.sling.discovery.InstanceDescription
-
isLocal
public boolean isLocal()- Specified by:
isLocal
in interfaceorg.apache.sling.discovery.InstanceDescription
-
getSlingId
- Specified by:
getSlingId
in interfaceorg.apache.sling.discovery.InstanceDescription
-
getProperty
- Specified by:
getProperty
in interfaceorg.apache.sling.discovery.InstanceDescription
-
getProperties
- Specified by:
getProperties
in interfaceorg.apache.sling.discovery.InstanceDescription
-
setProperties
Sets the properties of this instance- Parameters:
properties
-
-
setProperty
for testing only!
-