public abstract class

StateModelFactory

extends Object
java.lang.Object
   ↳ org.apache.helix.participant.statemachine.StateModelFactory<T extends org.apache.helix.participant.statemachine.StateModel>
Known Direct Subclasses

Summary

Public Constructors
StateModelFactory()
Public Methods
BatchMessageWrapper createAndAddBatchMessageWrapper(String resourceName)
create a batch-message-wrapper for a resource and put it into map
T createAndAddStateModel(String partitionName)
Create a state model for a partition
BatchMessageWrapper createBatchMessageWrapper(String resourceName)
create a default batch-message-wrapper for a resource
abstract T createNewStateModel(String partitionName)
This method will be invoked only once per partitionName per session
BatchMessageWrapper getBatchMessageWrapper(String resourceName)
get batch-message-wrapper for a resource
Set<String> getPartitionSet()
get partition set
T getStateModel(String partitionName)
Get the state model for a partition
T removeStateModel(String partitionName)
remove state model for a partition
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public StateModelFactory ()

Public Methods

public BatchMessageWrapper createAndAddBatchMessageWrapper (String resourceName)

create a batch-message-wrapper for a resource and put it into map

public T createAndAddStateModel (String partitionName)

Create a state model for a partition

public BatchMessageWrapper createBatchMessageWrapper (String resourceName)

create a default batch-message-wrapper for a resource

public abstract T createNewStateModel (String partitionName)

This method will be invoked only once per partitionName per session

public BatchMessageWrapper getBatchMessageWrapper (String resourceName)

get batch-message-wrapper for a resource

public Set<String> getPartitionSet ()

get partition set

Returns
  • partition key set

public T getStateModel (String partitionName)

Get the state model for a partition

Returns
  • state model if exists, null otherwise

public T removeStateModel (String partitionName)

remove state model for a partition

Returns
  • state model removed or null if not exist