Package org.onosproject.cluster
Class ClusterMetadata
- java.lang.Object
-
- org.onosproject.cluster.ClusterMetadata
-
- All Implemented Interfaces:
Provided
public final class ClusterMetadata extends 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(String name, ControllerNode localNode, Set<ControllerNode> controllerNodes, Set<Node> storageNodes)Deprecated.since 1.15.ClusterMetadata(String name, ControllerNode localNode, Set<ControllerNode> controllerNodes, Set<Node> storageNodes, String clusterSecret)ClusterMetadata(ProviderId providerId, String name, ControllerNode localNode, Set<ControllerNode> controllerNodes, String storageDnsService, Set<Node> storageNodes)Deprecated.since 1.15.ClusterMetadata(ProviderId providerId, String name, ControllerNode localNode, Set<ControllerNode> controllerNodes, String storageDnsService, Set<Node> storageNodes, String clusterSecret)ClusterMetadata(ProviderId providerId, String name, ControllerNode localNode, Set<ControllerNode> controllerNodes, Set<Node> storageNodes, String clusterSecret)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description booleanequals(Object object)StringgetClusterSecret()Returns the cluster's shared secret.Collection<ControllerNode>getControllerNodes()Returns the collection ofnodesthat make up the cluster.ControllerNodegetLocalNode()Returns the local controller node.StringgetName()Returns the name of the cluster.Collection<ControllerNode>getNodes()Deprecated.Collection<Partition>getPartitions()Deprecated.since 1.14StringgetStorageDnsService()Returns the DNS service through which to locate storage nodes.Collection<Node>getStorageNodes()Returns the collection of storage nodes.inthashCode()ProviderIdproviderId()Returns the identifier of the provider which supplied the entity.StringtoString()
-
-
-
Field Detail
-
HASH_FUNNEL
public static final com.google.common.hash.Funnel<ClusterMetadata> HASH_FUNNEL
-
-
Constructor Detail
-
ClusterMetadata
@Deprecated public ClusterMetadata(ProviderId providerId, String name, ControllerNode localNode, Set<ControllerNode> controllerNodes, String storageDnsService, 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, String name, ControllerNode localNode, Set<ControllerNode> controllerNodes, Set<Node> storageNodes, String clusterSecret)
-
ClusterMetadata
public ClusterMetadata(ProviderId providerId, String name, ControllerNode localNode, Set<ControllerNode> controllerNodes, String storageDnsService, Set<Node> storageNodes, String clusterSecret)
-
ClusterMetadata
@Deprecated public ClusterMetadata(String name, ControllerNode localNode, Set<ControllerNode> controllerNodes, 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(String name, ControllerNode localNode, Set<ControllerNode> controllerNodes, Set<Node> storageNodes, 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 String getName()
Returns the name of the cluster.- Returns:
- cluster name
-
getStorageDnsService
public 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 Collection<ControllerNode> getNodes()
Deprecated.Returns the collection ofnodesthat make up the cluster.- Returns:
- cluster nodes
-
getControllerNodes
public Collection<ControllerNode> getControllerNodes()
Returns the collection ofnodesthat make up the cluster.- Returns:
- controller nodes
-
getStorageNodes
public Collection<Node> getStorageNodes()
Returns the collection of storage nodes.- Returns:
- the collection of storage nodes
-
getPartitions
@Deprecated public Collection<Partition> getPartitions()
Deprecated.since 1.14Returns the collection ofpartitionsthat make up the cluster.- Returns:
- collection of partitions.
-
getClusterSecret
public String getClusterSecret()
Returns the cluster's shared secret.- Returns:
- key.
-
-