org.apache.sling.discovery.impl.common
Class DefaultInstanceDescriptionImpl
java.lang.Object
org.apache.sling.discovery.impl.common.DefaultInstanceDescriptionImpl
- All Implemented Interfaces:
- org.apache.sling.discovery.InstanceDescription
- Direct Known Subclasses:
- EstablishedInstanceDescription, IncomingInstanceDescription
public class DefaultInstanceDescriptionImpl
- 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!
Fields inherited from interface org.apache.sling.discovery.InstanceDescription |
PROPERTY_DESCRIPTION, PROPERTY_ENDPOINTS, PROPERTY_NAME |
DefaultInstanceDescriptionImpl
public DefaultInstanceDescriptionImpl(DefaultClusterViewImpl clusterView,
boolean isLeader,
boolean isOwn,
String slingId,
Map<String,String> properties)
toString
public String toString()
- Overrides:
toString
in class Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object
equals
public boolean equals(Object obj)
- Overrides:
equals
in class Object
getClusterView
public org.apache.sling.discovery.ClusterView getClusterView()
- Specified by:
getClusterView
in interface org.apache.sling.discovery.InstanceDescription
setClusterView
protected void setClusterView(org.apache.sling.discovery.ClusterView clusterView)
- Sets the cluster on this instance
- Parameters:
clusterView
-
isLeader
public boolean isLeader()
- Specified by:
isLeader
in interface org.apache.sling.discovery.InstanceDescription
isLocal
public boolean isLocal()
- Specified by:
isLocal
in interface org.apache.sling.discovery.InstanceDescription
getSlingId
public String getSlingId()
- Specified by:
getSlingId
in interface org.apache.sling.discovery.InstanceDescription
getProperty
public String getProperty(String name)
- Specified by:
getProperty
in interface org.apache.sling.discovery.InstanceDescription
getProperties
public Map<String,String> getProperties()
- Specified by:
getProperties
in interface org.apache.sling.discovery.InstanceDescription
setProperties
protected void setProperties(Map<String,String> properties)
- Sets the properties of this instance
- Parameters:
properties
-
Copyright © 2007–2014 The Apache Software Foundation. All rights reserved.