org.apache.sling.discovery.impl.topology
Class TopologyViewImpl

java.lang.Object
  extended by org.apache.sling.discovery.impl.topology.TopologyViewImpl
All Implemented Interfaces:
org.apache.sling.discovery.TopologyView

public class TopologyViewImpl
extends Object
implements org.apache.sling.discovery.TopologyView

Implementation of the topology view


Constructor Summary
TopologyViewImpl()
          Create a new empty topology
TopologyViewImpl(Collection<org.apache.sling.discovery.InstanceDescription> instances)
          Create a new topology filled with the given list of instances
 
Method Summary
 void addInstances(Collection<org.apache.sling.discovery.InstanceDescription> instances)
           
 org.apache.sling.discovery.TopologyEvent.Type compareTopology(TopologyViewImpl other)
          Compare this topology with the given one and determine how they compare
 boolean equals(Object obj)
           
 Set<org.apache.sling.discovery.InstanceDescription> findInstances(org.apache.sling.discovery.InstanceFilter picker)
           
 Set<org.apache.sling.discovery.ClusterView> getClusterViews()
           
 Set<org.apache.sling.discovery.InstanceDescription> getInstances()
           
 org.apache.sling.discovery.InstanceDescription getLocalInstance()
           
 int hashCode()
           
 boolean isCurrent()
           
 void markOld()
          Mark this topology as old
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TopologyViewImpl

public TopologyViewImpl()
Create a new empty topology


TopologyViewImpl

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

Method Detail

compareTopology

public org.apache.sling.discovery.TopologyEvent.Type compareTopology(TopologyViewImpl 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

isCurrent

public boolean isCurrent()
Specified by:
isCurrent in interface org.apache.sling.discovery.TopologyView
See Also:
TopologyView.isCurrent()

markOld

public void markOld()
Mark this topology as old


getLocalInstance

public org.apache.sling.discovery.InstanceDescription getLocalInstance()
Specified by:
getLocalInstance in interface org.apache.sling.discovery.TopologyView
See Also:
TopologyView.getLocalInstance()

getInstances

public Set<org.apache.sling.discovery.InstanceDescription> getInstances()
Specified by:
getInstances in interface org.apache.sling.discovery.TopologyView
See Also:
TopologyView.getInstances()

addInstances

public void addInstances(Collection<org.apache.sling.discovery.InstanceDescription> instances)

findInstances

public Set<org.apache.sling.discovery.InstanceDescription> findInstances(org.apache.sling.discovery.InstanceFilter picker)
Specified by:
findInstances in interface org.apache.sling.discovery.TopologyView
See Also:
TopologyView.findInstances(org.apache.sling.discovery.InstanceFilter)

getClusterViews

public Set<org.apache.sling.discovery.ClusterView> getClusterViews()
Specified by:
getClusterViews in interface org.apache.sling.discovery.TopologyView
See Also:
TopologyView.getClusterViews()

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2007–2014 The Apache Software Foundation. All rights reserved.