Enum SimScenario.SimAction
- java.lang.Object
-
- java.lang.Enum<SimScenario.SimAction>
-
- org.apache.solr.cloud.autoscaling.sim.SimScenario.SimAction
-
- All Implemented Interfaces:
Serializable
,Comparable<SimScenario.SimAction>
- Enclosing class:
- SimScenario
public static enum SimScenario.SimAction extends Enum<SimScenario.SimAction>
Actions supported by the scenario.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ADD_NODES
Add new nodes.APPLY_SUGGESTIONS
Apply previously calculated autoscaling suggestions.ASSERT
Assert a condition.CALCULATE_SUGGESTIONS
Calculate autoscaling suggestions and put them in the scenario's context.CREATE_CLUSTER
Create a new simulated cluster.CTX_REMOVE
Remove a variable from context.CTX_SET
Set a variable in context.DUMP
Dump the internal state of the simulator to console.EVENT_LISTENER
Prepare a listener to listen for an autoscaling event.INDEX_DOCS
Bulk index a number of simulated documents.KILL_NODES
Kill specific nodes, or a number of randomly selected nodes.LOAD_AUTOSCALING
Load autoscaling.json configuration from a file.LOAD_SNAPSHOT
Create a simulated cluster from autoscaling snapshot.LOOP_END
End a loop.LOOP_START
Start a loop.RUN
Run the simulation for a while, allowing background tasks to execute.SAVE_SNAPSHOT
Save autoscaling snapshot of the current simulated cluster.SET_NODE_METRICS
Set metrics for a node.SET_OP_DELAYS
Set operation delays to simulate long-running actions.SET_SHARD_METRICS
Set metrics for each replica of a collection's shard(s).SOLR_REQUEST
Execute a SolrRequest (must be supported bySimCloudManager
).WAIT_COLLECTION
Wait for a collection to reach the indicated number of shards and replicas.WAIT_EVENT
Wait for an autoscaling event using previously prepared listener.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static SimScenario.SimAction
get(String str)
String
toLower()
static SimScenario.SimAction
valueOf(String name)
Returns the enum constant of this type with the specified name.static SimScenario.SimAction[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
CREATE_CLUSTER
public static final SimScenario.SimAction CREATE_CLUSTER
Create a new simulated cluster.
-
LOAD_SNAPSHOT
public static final SimScenario.SimAction LOAD_SNAPSHOT
Create a simulated cluster from autoscaling snapshot.
-
SAVE_SNAPSHOT
public static final SimScenario.SimAction SAVE_SNAPSHOT
Save autoscaling snapshot of the current simulated cluster.
-
CALCULATE_SUGGESTIONS
public static final SimScenario.SimAction CALCULATE_SUGGESTIONS
Calculate autoscaling suggestions and put them in the scenario's context.
-
APPLY_SUGGESTIONS
public static final SimScenario.SimAction APPLY_SUGGESTIONS
Apply previously calculated autoscaling suggestions.
-
KILL_NODES
public static final SimScenario.SimAction KILL_NODES
Kill specific nodes, or a number of randomly selected nodes.
-
ADD_NODES
public static final SimScenario.SimAction ADD_NODES
Add new nodes.
-
LOAD_AUTOSCALING
public static final SimScenario.SimAction LOAD_AUTOSCALING
Load autoscaling.json configuration from a file.
-
LOOP_START
public static final SimScenario.SimAction LOOP_START
Start a loop.
-
LOOP_END
public static final SimScenario.SimAction LOOP_END
End a loop.
-
SET_OP_DELAYS
public static final SimScenario.SimAction SET_OP_DELAYS
Set operation delays to simulate long-running actions.
-
SOLR_REQUEST
public static final SimScenario.SimAction SOLR_REQUEST
Execute a SolrRequest (must be supported bySimCloudManager
).
-
WAIT_COLLECTION
public static final SimScenario.SimAction WAIT_COLLECTION
Wait for a collection to reach the indicated number of shards and replicas.
-
EVENT_LISTENER
public static final SimScenario.SimAction EVENT_LISTENER
Prepare a listener to listen for an autoscaling event.
-
WAIT_EVENT
public static final SimScenario.SimAction WAIT_EVENT
Wait for an autoscaling event using previously prepared listener.
-
RUN
public static final SimScenario.SimAction RUN
Run the simulation for a while, allowing background tasks to execute.
-
DUMP
public static final SimScenario.SimAction DUMP
Dump the internal state of the simulator to console.
-
CTX_SET
public static final SimScenario.SimAction CTX_SET
Set a variable in context.
-
CTX_REMOVE
public static final SimScenario.SimAction CTX_REMOVE
Remove a variable from context.
-
SET_NODE_METRICS
public static final SimScenario.SimAction SET_NODE_METRICS
Set metrics for a node.
-
SET_SHARD_METRICS
public static final SimScenario.SimAction SET_SHARD_METRICS
Set metrics for each replica of a collection's shard(s).
-
INDEX_DOCS
public static final SimScenario.SimAction INDEX_DOCS
Bulk index a number of simulated documents.
-
ASSERT
public static final SimScenario.SimAction ASSERT
Assert a condition.
-
-
Method Detail
-
values
public static SimScenario.SimAction[] 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 (SimScenario.SimAction c : SimScenario.SimAction.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static SimScenario.SimAction valueOf(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:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
get
public static SimScenario.SimAction get(String str)
-
toLower
public String toLower()
-
-