Class ClusterMetadata

  • All Implemented Interfaces:
    Provided

    public final class ClusterMetadata
    extends java.lang.Object
    implements Provided
    Cluster metadata.

    Metadata specifies how a ONOS cluster is constituted and is made up of the collection of nodes and the collection of data partitions.

    • Field Detail

      • HASH_FUNNEL

        public static final com.google.common.hash.Funnel<ClusterMetadata> HASH_FUNNEL
    • Constructor Detail

      • ClusterMetadata

        @Deprecated
        public ClusterMetadata​(ProviderId providerId,
                               java.lang.String name,
                               ControllerNode localNode,
                               java.util.Set<ControllerNode> controllerNodes,
                               java.lang.String storageDnsService,
                               java.util.Set<Node> storageNodes)
        Deprecated.
        since 1.15.
        Parameters:
        providerId - the provider Id
        name - The cluster Name
        localNode - The local node
        controllerNodes - Set of nodes in cluster
        storageDnsService - The storage DNS service name
        storageNodes - Set of storage nodes
      • ClusterMetadata

        public ClusterMetadata​(ProviderId providerId,
                               java.lang.String name,
                               ControllerNode localNode,
                               java.util.Set<ControllerNode> controllerNodes,
                               java.util.Set<Node> storageNodes,
                               java.lang.String clusterSecret)
      • ClusterMetadata

        public ClusterMetadata​(ProviderId providerId,
                               java.lang.String name,
                               ControllerNode localNode,
                               java.util.Set<ControllerNode> controllerNodes,
                               java.lang.String storageDnsService,
                               java.util.Set<Node> storageNodes,
                               java.lang.String clusterSecret)
      • ClusterMetadata

        @Deprecated
        public ClusterMetadata​(java.lang.String name,
                               ControllerNode localNode,
                               java.util.Set<ControllerNode> controllerNodes,
                               java.util.Set<Node> storageNodes)
        Deprecated.
        since 1.15.
        Parameters:
        name - The cluster Name
        localNode - The local node
        controllerNodes - Set of nodes in cluster
        storageNodes - Set of storage nodes
      • ClusterMetadata

        public ClusterMetadata​(java.lang.String name,
                               ControllerNode localNode,
                               java.util.Set<ControllerNode> controllerNodes,
                               java.util.Set<Node> storageNodes,
                               java.lang.String clusterSecret)
    • Method Detail

      • providerId

        public ProviderId providerId()
        Description copied from interface: Provided
        Returns the identifier of the provider which supplied the entity.
        Specified by:
        providerId in interface Provided
        Returns:
        provider identification
      • getName

        public java.lang.String getName()
        Returns the name of the cluster.
        Returns:
        cluster name
      • getStorageDnsService

        public java.lang.String getStorageDnsService()
        Returns the DNS service through which to locate storage nodes.
        Returns:
        the DNS service through which to locate storage nodes
      • getLocalNode

        public ControllerNode getLocalNode()
        Returns the local controller node.
        Returns:
        the local controller node
      • getNodes

        @Deprecated
        public java.util.Collection<ControllerNode> getNodes()
        Deprecated.
        Returns the collection of nodes that make up the cluster.
        Returns:
        cluster nodes
      • getControllerNodes

        public java.util.Collection<ControllerNode> getControllerNodes()
        Returns the collection of nodes that make up the cluster.
        Returns:
        controller nodes
      • getStorageNodes

        public java.util.Collection<Node> getStorageNodes()
        Returns the collection of storage nodes.
        Returns:
        the collection of storage nodes
      • getPartitions

        @Deprecated
        public java.util.Collection<Partition> getPartitions()
        Deprecated.
        since 1.14
        Returns the collection of partitions that make up the cluster.
        Returns:
        collection of partitions.
      • getClusterSecret

        public java.lang.String getClusterSecret()
        Returns the cluster's shared secret.
        Returns:
        key.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object object)
        Overrides:
        equals in class java.lang.Object