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!

  • Constructor Details

  • Method Details

    • 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
    • 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 -
    • setProperty

      public void setProperty(String key, String value)
      for testing only!