Interface TopologyView

All Known Implementing Classes:
BaseTopologyView, DefaultTopologyView

@ProviderType public interface TopologyView
A topology view is a cross-cluster list of instances and clusters that have announced themselves with the DiscoveryService.

All instances in a topology must and do have a unique sling.id.

See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    Searches through this topology and picks those accepted by the provided InstanceFilter - and returns them without any particular order
    Provides the collection of ClusterViews.
    Provides the set of InstanceDescriptions in the entire topology, without any particular order
    Provides the InstanceDescription belonging to this instance.
    boolean
    Checks if this TopologyView is currently valid - or if the service knows of a topology change just going on (or another uncertainty about the topology such as IOException etc)
  • Method Details

    • isCurrent

      boolean isCurrent()
      Checks if this TopologyView is currently valid - or if the service knows of a topology change just going on (or another uncertainty about the topology such as IOException etc)
      Returns:
      true if this TopologyView is currently valid, false if the service knows of a topology change just going on (or another issue with discovery like IOException etc)
    • getLocalInstance

      InstanceDescription getLocalInstance()
      Provides the InstanceDescription belonging to this instance.
      Returns:
      the InstanceDescription belonging to this instance
    • getInstances

      Set<InstanceDescription> getInstances()
      Provides the set of InstanceDescriptions in the entire topology, without any particular order
      Returns:
      the set of InstanceDescriptions in the entire topology, without any particular order
    • findInstances

      Set<InstanceDescription> findInstances(InstanceFilter filter)
      Searches through this topology and picks those accepted by the provided InstanceFilter - and returns them without any particular order
      Parameters:
      filter - the filter to use
      Returns:
      the set of InstanceDescriptions which were accepted by the InstanceFilter, without any particular order
    • getClusterViews

      Set<ClusterView> getClusterViews()
      Provides the collection of ClusterViews.

      Note that all InstanceDescriptions belong to exactly one ClusterView - including InstanceDescriptions that form "a cluster of 1"

      Returns:
      the set of ClusterViews, without any particular order