Package com.github.ambry.clustermap
Enum StateModelListenerType
- java.lang.Object
-
- java.lang.Enum<StateModelListenerType>
-
- com.github.ambry.clustermap.StateModelListenerType
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<StateModelListenerType>
public enum StateModelListenerType extends java.lang.Enum<StateModelListenerType>
The type of partition state model listener. The state model listeners implementPartitionStateChangeListener
in different components (i.e. StorageManager, ReplicationManager etc) and take actions when state transition occurs.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description CloudToStoreReplicationManagerListener
The partition state change listener owned by cloud-to-store replication manager.ReplicationManagerListener
The partition state change listener owned by replication manager.StatsManagerListener
The partition state change listener owned by stats manager.StorageManagerListener
The partition state change listener owned by storage manager.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StateModelListenerType
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static StateModelListenerType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
StorageManagerListener
public static final StateModelListenerType StorageManagerListener
The partition state change listener owned by storage manager. It invokes some store operations when partition state transition occurs. For example, when new replica transits from OFFLINE to BOOTSTRAP, storage manager instantiates blob store associated with this replica and adds it into disk manager and compaction manager.
-
ReplicationManagerListener
public static final StateModelListenerType ReplicationManagerListener
The partition state change listener owned by replication manager. It performs some replica operations in response to partition state transition. For example, when new replica transits from BOOTSTRAP to STANDBY, replication manager keeps checking replication lag of this replica and ensures it catches up with its peer replicas.
-
StatsManagerListener
public static final StateModelListenerType StatsManagerListener
The partition state change listener owned by stats manager. It takes actions when new replica is added (OFFLINE -> BOOTSTRAP) or old replica is removed (INACTIVE -> OFFLINE)
-
CloudToStoreReplicationManagerListener
public static final StateModelListenerType CloudToStoreReplicationManagerListener
The partition state change listener owned by cloud-to-store replication manager. It takes actions when replica leadership hand-off occurs. For example, if any replica becomes LEADER from STANDBY, it is supposed to replicate data from VCR nodes. This is part of two-way replication between Ambry and cloud.
-
-
Method Detail
-
values
public static StateModelListenerType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (StateModelListenerType c : StateModelListenerType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static StateModelListenerType valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
-