public abstract class

HelixStateModelFactory

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

Class Overview

State model factory that uses concrete id classes instead of strings. Replacing StateModelFactory

Summary

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

Public Constructors

public HelixStateModelFactory ()

Public Methods

public BatchMessageWrapper createAndAddBatchMessageWrapper (ResourceId resourceId)

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

public T createAndAddStateModel (PartitionId partitionId)

Create a state model for a partition

public BatchMessageWrapper createBatchMessageWrapper (ResourceId resourceId)

create a default batch-message-wrapper for a resource

public abstract T createNewStateModel (PartitionId partitionId)

This method will be invoked only once per partition per session

public BatchMessageWrapper getBatchMessageWrapper (ResourceId resourceId)

get batch-message-wrapper for a resource

public Set<PartitionId> getPartitionSet ()

get partition set

Returns
  • partitionId set

public T getStateModel (PartitionId partitionId)

Get the state model for a partition

Returns
  • state model if exists, null otherwise

public T removeStateModel (PartitionId partitionId)

remove state model for a partition

Returns
  • state model removed or null if not exist