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 resourceName, String partitionKey)
Create a state model for a partition
T createAndAddStateModel(String partitionName)
NOTE: This method is deprecated.
BatchMessageWrapper createBatchMessageWrapper(String resourceName)
create a default batch-message-wrapper for a resource
T createNewStateModel(String partitionName)
NOTE: This method is deprecated.
T createNewStateModel(String resourceName, String partitionName)
This method will be invoked only once per resource per partition per session Replace deprecating StateModelFactory#createNewStateModel(String partitionName) Add "resourceName" to signature @see HELIX-552
BatchMessageWrapper getBatchMessageWrapper(String resourceName)
get batch-message-wrapper for a resource
Set<String> getPartitionSet(String resourceName)
get partition set for a resource
Set<String> getPartitionSet()
NOTE: This method is deprecated.
Set<String> getResourceSet()
get resource set
T getStateModel(String partitionName)
NOTE: This method is deprecated.
T getStateModel(String resourceName, String partitionKey)
Get the state model for a partition
T removeStateModel(String resourceName, String partitionKey)
remove state model for a partition
T removeStateModel(String partitionName)
NOTE: This method is deprecated.
[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

Returns
  • batch message handler

public T createAndAddStateModel (String resourceName, String partitionKey)

Create a state model for a partition

Returns
  • state model

public T createAndAddStateModel (String partitionName)

NOTE: This method is deprecated. Bring it back to keep backward compatible. Replaced by StateModelFactory#createAndAddStateModel(String resourceName, String partitionKey) Create a state model for a partition

Returns
  • state model

public BatchMessageWrapper createBatchMessageWrapper (String resourceName)

create a default batch-message-wrapper for a resource

Returns
  • batch message handler

public T createNewStateModel (String partitionName)

NOTE: This method is deprecated. Bring it back to keep backward compatible. Replaced by StateModelFactory#createNewStateModel(String resourceName, String partitionName) This method will be invoked only once per partitionName per session

Returns
  • state model

public T createNewStateModel (String resourceName, String partitionName)

This method will be invoked only once per resource per partition per session Replace deprecating StateModelFactory#createNewStateModel(String partitionName) Add "resourceName" to signature @see HELIX-552

Returns
  • state model

public BatchMessageWrapper getBatchMessageWrapper (String resourceName)

get batch-message-wrapper for a resource

Returns
  • batch message handler

public Set<String> getPartitionSet (String resourceName)

get partition set for a resource

Returns
  • partition key set

public Set<String> getPartitionSet ()

NOTE: This method is deprecated. Bring it back to keep backward compatible. Replaced by StateModelFactory#getPartitionSet(String resourceName) get partition set

Returns
  • partition key set

public Set<String> getResourceSet ()

get resource set

Returns
  • resource name set

public T getStateModel (String partitionName)

NOTE: This method is deprecated. Bring it back to keep backward compatible. Replaced by StateModelFactory#getStateModel(String resourceName, String partitionKey) Get the state model for a partition

Returns
  • state model if exists, null otherwise

public T getStateModel (String resourceName, String partitionKey)

Get the state model for a partition

Returns
  • state model if exists, null otherwise

public T removeStateModel (String resourceName, String partitionKey)

remove state model for a partition

Returns
  • state model removed or null if not exist

public T removeStateModel (String partitionName)

NOTE: This method is deprecated. Bring it back to keep backward compatible. Replaced by StateModelFactory#removeStateModel(String resourceName, String partitionKey) remove state model for a partition

Returns
  • state model removed or null if not exist