public class

ResourceCurrentState

extends Object
java.lang.Object
   ↳ org.apache.helix.controller.stages.ResourceCurrentState

Summary

Public Constructors
ResourceCurrentState()
construct
Public Methods
int getBucketSize(ResourceId resourceId)
State getCurrentState(ResourceId resourceId, PartitionId partitionId, ParticipantId participantId)
given (resource, partition, instance), returns currentState
Map<ParticipantIdState> getCurrentStateMap(ResourceId resourceId, PartitionId partitionId)
Set<PartitionId> getCurrentStateMappedPartitions(ResourceId resourceId)
Get the partitions mapped in the current state
String getInfo(ResourceId resourceId, PartitionId partitionId, ParticipantId participantId)
State getPendingState(ResourceId resourceId, PartitionId partitionId, ParticipantId participantId)
given (resource, partition, instance), returns toState
Map<ParticipantIdState> getPendingStateMap(ResourceId resourceId, PartitionId partitionId)
State getRequestedState(ResourceId resourceId, PartitionId partitionId, ParticipantId participantId)
Set<ResourceId> getResourceIds()
Get all the resources seen in the aggregated current state
StateModelDefId getResourceStateModelDef(ResourceId resourceId)
void setBucketSize(ResourceId resourceId, int bucketSize)
void setCurrentState(ResourceId resourceId, PartitionId partitionId, ParticipantId participantId, State state)
void setInfo(ResourceId resourceId, PartitionId partitionId, ParticipantId participantId, String info)
void setPendingState(ResourceId resourceId, PartitionId partitionId, ParticipantId participantId, State state)
void setRequestedState(ResourceId resourceId, PartitionId partitionId, ParticipantId participantId, State state)
void setResourceStateModelDef(ResourceId resourceId, StateModelDefId stateModelDefId)
String toString()
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public ResourceCurrentState ()

construct

Public Methods

public int getBucketSize (ResourceId resourceId)

public State getCurrentState (ResourceId resourceId, PartitionId partitionId, ParticipantId participantId)

given (resource, partition, instance), returns currentState

public Map<ParticipantIdState> getCurrentStateMap (ResourceId resourceId, PartitionId partitionId)

public Set<PartitionId> getCurrentStateMappedPartitions (ResourceId resourceId)

Get the partitions mapped in the current state

Parameters
resourceId resource to look up
Returns
  • set of mapped partitions, or empty set if there are none

public String getInfo (ResourceId resourceId, PartitionId partitionId, ParticipantId participantId)

public State getPendingState (ResourceId resourceId, PartitionId partitionId, ParticipantId participantId)

given (resource, partition, instance), returns toState

public Map<ParticipantIdState> getPendingStateMap (ResourceId resourceId, PartitionId partitionId)

public State getRequestedState (ResourceId resourceId, PartitionId partitionId, ParticipantId participantId)

public Set<ResourceId> getResourceIds ()

Get all the resources seen in the aggregated current state

Returns
  • set of ResourceId

public StateModelDefId getResourceStateModelDef (ResourceId resourceId)

public void setBucketSize (ResourceId resourceId, int bucketSize)

public void setCurrentState (ResourceId resourceId, PartitionId partitionId, ParticipantId participantId, State state)

public void setInfo (ResourceId resourceId, PartitionId partitionId, ParticipantId participantId, String info)

public void setPendingState (ResourceId resourceId, PartitionId partitionId, ParticipantId participantId, State state)

public void setRequestedState (ResourceId resourceId, PartitionId partitionId, ParticipantId participantId, State state)

public void setResourceStateModelDef (ResourceId resourceId, StateModelDefId stateModelDefId)

public String toString ()