public class StateOperation<T> extends Object
Represents a single state operation for execution by a cursor.
Modifier and Type | Class and Description |
---|---|
static class |
StateOperation.OperationType
Available state operation types
|
Constructor and Description |
---|
StateOperation()
Create new StateOperation
|
Modifier and Type | Method and Description |
---|---|
StateOperation<T> |
get(String key)
Configure as a get operation
|
StateOperation<T> |
getAll()
Configure as a get all operation
|
UUID |
getId()
Get operation ID
|
String |
getKey()
Get key
|
StateOperation.OperationType |
getOperationType()
Get operation type
|
T |
getResultValue()
Get result value
|
ArrayList<T> |
getResultValues()
Get result values
|
T |
getValue()
Get value
|
StateOperation<T> |
set(String key,
T value)
Configure as a set operation
|
void |
setResultValue(T resultValue)
Set result value
|
void |
setResultValues(ArrayList<T> resultValues)
Set result values
|
public UUID getId()
public String getKey()
public T getValue()
public void setResultValue(T resultValue)
resultValue
- Result valuepublic T getResultValue()
Return the results of an operation, where the operation should have had a single result (e.g., a key fetch).
public void setResultValues(ArrayList<T> resultValues)
resultValues
- Result valuespublic ArrayList<T> getResultValues()
Return the results of an operation, where the operation should have had one or more results (e.g., a get all operation).
public StateOperation.OperationType getOperationType()
public StateOperation<T> get(String key)
key
- Key for entity to fetchpublic StateOperation<T> getAll()
public StateOperation<T> set(String key, T value)
key
- Key for entity to setvalue
- Value to associate with entity stateCopyright © 2022. All rights reserved.