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 TypeMethodDescriptionbooleanorg.apache.sling.discovery.ClusterViewgetProperty(String name) inthashCode()booleanisLeader()booleanisLocal()protected voidsetProperties(Map<String, String> properties) Sets the properties of this instancevoidsetProperty(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:
getClusterViewin interfaceorg.apache.sling.discovery.InstanceDescription
-
isLeader
public boolean isLeader()- Specified by:
isLeaderin interfaceorg.apache.sling.discovery.InstanceDescription
-
isLocal
public boolean isLocal()- Specified by:
isLocalin interfaceorg.apache.sling.discovery.InstanceDescription
-
getSlingId
- Specified by:
getSlingIdin interfaceorg.apache.sling.discovery.InstanceDescription
-
getProperty
- Specified by:
getPropertyin interfaceorg.apache.sling.discovery.InstanceDescription
-
getProperties
- Specified by:
getPropertiesin interfaceorg.apache.sling.discovery.InstanceDescription
-
setProperties
Sets the properties of this instance- Parameters:
properties-
-
setProperty
for testing only!
-