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 Summary
ConstructorsConstructorDescriptionCreate a new empty topologyDefaultTopologyView
(Collection<org.apache.sling.discovery.InstanceDescription> instances) Create a new topology filled with the given list of instances -
Method Summary
Modifier and TypeMethodDescriptionvoid
addInstances
(Collection<org.apache.sling.discovery.InstanceDescription> instances) Adds the given instances to this topologyorg.apache.sling.discovery.TopologyEvent.Type
Compare this topology with the given one and determine how they compareboolean
Set
<org.apache.sling.discovery.InstanceDescription> findInstances
(org.apache.sling.discovery.InstanceFilter picker) Set
<org.apache.sling.discovery.ClusterView> Set
<org.apache.sling.discovery.InstanceDescription> org.apache.sling.discovery.InstanceDescription
int
hashCode()
void
setLocalClusterView
(org.apache.sling.discovery.commons.providers.spi.LocalClusterView localClusterView) Adds the instances of the given ClusterView to this topologytoString()
Methods inherited from class org.apache.sling.discovery.commons.providers.BaseTopologyView
getInstance, isCurrent, setNotCurrent, toShortString
-
Constructor Details
-
DefaultTopologyView
public DefaultTopologyView()Create a new empty topology -
DefaultTopologyView
Create a new topology filled with the given list of instances
-
-
Method Details
-
compareTopology
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:
-
equals
-
hashCode
public int hashCode() -
getLocalInstance
public org.apache.sling.discovery.InstanceDescription getLocalInstance()- See Also:
-
getInstances
- See Also:
-
setLocalClusterView
public void setLocalClusterView(org.apache.sling.discovery.commons.providers.spi.LocalClusterView localClusterView) Adds the instances of the given ClusterView to this topology -
addInstances
Adds the given instances to this topology -
findInstances
public Set<org.apache.sling.discovery.InstanceDescription> findInstances(org.apache.sling.discovery.InstanceFilter picker) - See Also:
-
getClusterViews
- See Also:
-
toString
-
getLocalClusterSyncTokenId
- Specified by:
getLocalClusterSyncTokenId
in classorg.apache.sling.discovery.commons.providers.BaseTopologyView
-