Class DefaultTopologyView

java.lang.Object
org.apache.sling.discovery.commons.providers.BaseTopologyView
org.apache.sling.discovery.base.commons.DefaultTopologyView
All Implemented Interfaces:
org.apache.sling.discovery.TopologyView

public class DefaultTopologyView extends org.apache.sling.discovery.commons.providers.BaseTopologyView
Default Implementation of the topology view interface
  • Constructor Details

    • DefaultTopologyView

      public DefaultTopologyView()
      Create a new empty topology
    • DefaultTopologyView

      public DefaultTopologyView(Collection<org.apache.sling.discovery.InstanceDescription> instances)
      Create a new topology filled with the given list of instances
  • Method Details

    • compareTopology

      public org.apache.sling.discovery.TopologyEvent.Type compareTopology(DefaultTopologyView other)
      Compare this topology with the given one and determine how they compare
      Parameters:
      other - the other topology against which to compare
      Returns:
      the type describing how these two compare
      See Also:
      • TopologyEvent.Type
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • getLocalInstance

      public org.apache.sling.discovery.InstanceDescription getLocalInstance()
      See Also:
      • TopologyView.getLocalInstance()
    • getInstances

      public Set<org.apache.sling.discovery.InstanceDescription> getInstances()
      See Also:
      • TopologyView.getInstances()
    • setLocalClusterView

      public void setLocalClusterView(org.apache.sling.discovery.commons.providers.spi.LocalClusterView localClusterView)
      Adds the instances of the given ClusterView to this topology
    • addInstances

      public void addInstances(Collection<org.apache.sling.discovery.InstanceDescription> instances)
      Adds the given instances to this topology
    • findInstances

      public Set<org.apache.sling.discovery.InstanceDescription> findInstances(org.apache.sling.discovery.InstanceFilter picker)
      See Also:
      • TopologyView.findInstances(org.apache.sling.discovery.InstanceFilter)
    • getClusterViews

      public Set<org.apache.sling.discovery.ClusterView> getClusterViews()
      See Also:
      • TopologyView.getClusterViews()
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getLocalClusterSyncTokenId

      public String getLocalClusterSyncTokenId()
      Specified by:
      getLocalClusterSyncTokenId in class org.apache.sling.discovery.commons.providers.BaseTopologyView