public class

Scope

extends Object
java.lang.Object
   ↳ org.apache.helix.api.Scope<T extends org.apache.helix.api.id.Id>

Class Overview

Represents the scope of an object. For instance, a configuration can belong to a specific scope of cluster, participant, partition, or resource, but not more than one of these at any time.

Summary

Nested Classes
enum Scope.ScopeType  
Public Methods
static Scope<ClusterId> cluster(ClusterId clusterId)
Get a cluster scope
boolean equals(Object that)
T getScopedId()
Get the scope that is tracked
Scope.ScopeType getType()
Get the Helix entity type that this scope covers
static Scope<ParticipantId> participant(ParticipantId participantId)
Get a participant scope
static Scope<PartitionId> partition(PartitionId partitionId)
Get a partition scope
static Scope<ResourceId> resource(ResourceId resourceId)
Get a resource scope
String toString()
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public static Scope<ClusterId> cluster (ClusterId clusterId)

Get a cluster scope

Parameters
clusterId the id of the cluster that is scoped
Returns
  • cluster scope

public boolean equals (Object that)

public T getScopedId ()

Get the scope that is tracked

Returns
  • The id of the scoped object

public Scope.ScopeType getType ()

Get the Helix entity type that this scope covers

Returns
  • scope type

public static Scope<ParticipantId> participant (ParticipantId participantId)

Get a participant scope

Parameters
participantId the id of the participant that is scoped
Returns
  • participant scope

public static Scope<PartitionId> partition (PartitionId partitionId)

Get a partition scope

Parameters
partitionId the id of the partition that is scoped
Returns
  • partition scope

public static Scope<ResourceId> resource (ResourceId resourceId)

Get a resource scope

Parameters
resourceId the id of the resource that is scoped
Returns
  • resource scope

public String toString ()