Package org.onosproject.cluster
Class ClusterMetadata
- java.lang.Object
-
- org.onosproject.cluster.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
nodesand the collection of datapartitions.
-
-
Field Summary
Fields Modifier and Type Field Description static com.google.common.hash.Funnel<ClusterMetadata>HASH_FUNNEL
-
Constructor Summary
Constructors Constructor Description ClusterMetadata(java.lang.String name, ControllerNode localNode, java.util.Set<ControllerNode> controllerNodes, java.util.Set<Node> storageNodes)Deprecated.since 1.15.ClusterMetadata(java.lang.String name, ControllerNode localNode, java.util.Set<ControllerNode> controllerNodes, java.util.Set<Node> storageNodes, java.lang.String clusterSecret)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.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(ProviderId providerId, java.lang.String name, ControllerNode localNode, java.util.Set<ControllerNode> controllerNodes, java.util.Set<Node> storageNodes, java.lang.String clusterSecret)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description booleanequals(java.lang.Object object)java.lang.StringgetClusterSecret()Returns the cluster's shared secret.java.util.Collection<ControllerNode>getControllerNodes()Returns the collection ofnodesthat make up the cluster.ControllerNodegetLocalNode()Returns the local controller node.java.lang.StringgetName()Returns the name of the cluster.java.util.Collection<ControllerNode>getNodes()Deprecated.java.util.Collection<Partition>getPartitions()Deprecated.since 1.14java.lang.StringgetStorageDnsService()Returns the DNS service through which to locate storage nodes.java.util.Collection<Node>getStorageNodes()Returns the collection of storage nodes.inthashCode()ProviderIdproviderId()Returns the identifier of the provider which supplied the entity.java.lang.StringtoString()
-
-
-
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 Idname- The cluster NamelocalNode- The local nodecontrollerNodes- Set of nodes in clusterstorageDnsService- The storage DNS service namestorageNodes- 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 NamelocalNode- The local nodecontrollerNodes- Set of nodes in clusterstorageNodes- 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:ProvidedReturns the identifier of the provider which supplied the entity.- Specified by:
providerIdin interfaceProvided- 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 ofnodesthat make up the cluster.- Returns:
- cluster nodes
-
getControllerNodes
public java.util.Collection<ControllerNode> getControllerNodes()
Returns the collection ofnodesthat 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.14Returns the collection ofpartitionsthat 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:
toStringin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object object)
- Overrides:
equalsin classjava.lang.Object
-
-