public class OperationQueue extends Object
Modifier and Type | Field and Description |
---|---|
protected List<Operation> |
queuedOperations |
Constructor and Description |
---|
OperationQueue() |
Modifier and Type | Method and Description |
---|---|
void |
clear() |
void |
clearPersistDeleteUpdateOperations() |
void |
enqueue(Operation oper)
Method to add the specified operation to the operation queue.
|
List<Operation> |
getOperations()
Method to provide access to inspect the queued operations.
|
protected static boolean |
isAddFollowedByRemoveOnSameSCO(Store store,
ObjectProvider op,
Operation currentOper,
ListIterator<Operation> listIter)
Convenience optimisation checker to return if the current operation is ADD of an element that is
immediately REMOVED.
|
protected static boolean |
isPutFollowedByRemoveOnSameSCO(Store store,
ObjectProvider op,
Operation currentOper,
ListIterator<Operation> listIter)
Convenience optimisation checker to return if the current operation is PUT of a key that is
immediately REMOVED.
|
protected static boolean |
isRemoveFollowedByAddOnSameSCO(Store store,
ObjectProvider op,
Operation currentOper,
ListIterator<Operation> listIter)
Convenience optimisation checker to return if the current operation is REMOVE of an element that is
immediately ADDed.
|
void |
log()
Convenience method to log the current operation queue.
|
void |
performAll()
Method to perform all operations queued.
|
void |
performAll(Store store,
ObjectProvider op)
Method to perform all operations queued for the specified ObjectProvider and backing store.
|
void |
processOperationsForNoBackingStoreSCOs(ExecutionContext ec)
Method to process all SCO operations where the SCOs don't use a backing store.
|
void |
removeOperations(List<Operation> removedOps) |
public void enqueue(Operation oper)
oper
- Operationpublic void log()
public void clear()
public List<Operation> getOperations()
public void performAll()
public void performAll(Store store, ObjectProvider op)
store
- The backing storeop
- ObjectProviderpublic void clearPersistDeleteUpdateOperations()
public void processOperationsForNoBackingStoreSCOs(ExecutionContext ec)
ec
- ExecutionContextprotected static boolean isAddFollowedByRemoveOnSameSCO(Store store, ObjectProvider op, Operation currentOper, ListIterator<Operation> listIter)
store
- The backing storeop
- The object providercurrentOper
- The current operationlistIter
- The iterator of operationsprotected static boolean isRemoveFollowedByAddOnSameSCO(Store store, ObjectProvider op, Operation currentOper, ListIterator<Operation> listIter)
store
- The backing storeop
- The object providercurrentOper
- The current operationlistIter
- The iterator of operationsprotected static boolean isPutFollowedByRemoveOnSameSCO(Store store, ObjectProvider op, Operation currentOper, ListIterator<Operation> listIter)
store
- The backing storeop
- The object providercurrentOper
- The current operationlistIter
- The iterator of operationsCopyright © 2019. All rights reserved.