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
nodes
and 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 boolean
equals(Object object)
String
getClusterSecret()
Returns the cluster's shared secret.Collection<ControllerNode>
getControllerNodes()
Returns the collection ofnodes
that make up the cluster.ControllerNode
getLocalNode()
Returns the local controller node.String
getName()
Returns the name of the cluster.Collection<ControllerNode>
getNodes()
Deprecated.Collection<Partition>
getPartitions()
Deprecated.since 1.14String
getStorageDnsService()
Returns the DNS service through which to locate storage nodes.Collection<Node>
getStorageNodes()
Returns the collection of storage nodes.int
hashCode()
ProviderId
providerId()
Returns the identifier of the provider which supplied the entity.String
toString()
-
-
-
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:Provided
Returns the identifier of the provider which supplied the entity.- Specified by:
providerId
in 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 ofnodes
that make up the cluster.- Returns:
- cluster nodes
-
getControllerNodes
public Collection<ControllerNode> getControllerNodes()
Returns the collection ofnodes
that 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 ofpartitions
that make up the cluster.- Returns:
- collection of partitions.
-
getClusterSecret
public String getClusterSecret()
Returns the cluster's shared secret.- Returns:
- key.
-
-