public abstract class Operation<KEY,VALUE>
extends java.lang.Object
NodeStore
which is included in a TransactionalNodeStore.| Constructor and Description |
|---|
Operation()
Create a new operation with key and value set to null.
|
Operation(KEY key,
VALUE value)
Create a new operation with key and value set to the given parameters.
|
| Modifier and Type | Method and Description |
|---|---|
void |
delete()
Delete this operation.
|
protected abstract void |
doExecute()
Implementing classes should implement this method.
|
void |
execute()
Execute this operation if
delete() has not been called on it. |
KEY |
getKey()
Return a unique identifier that allows for tracking of this operation.
|
VALUE |
getValue()
Return the value of this operation if it is successful.
|
boolean |
isDeleted()
Return if this operation is deleted.
|
public Operation()
public VALUE getValue()
public KEY getKey()
public void delete()
TransactionalNodeStore
structure. Rather, its delete() method is called to release all unecessary data
and mark the Operation as deleted.
Deleted operations will not be executed when the TransactionalNodeStore is committed.public boolean isDeleted()
public void execute()
delete() has not been called on it.java.lang.RuntimeException - or other unchecked exceptions to communicate failure.