|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.datanucleus.store.types.queued.SCOOperationQueue
public class SCOOperationQueue
Queue of operations to be performed on second class collections/maps. When we are queueing operations until flush()/commit() they wait in this queue until the moment arrives for flushing to the datastore (and
performAllis called). Note that this queue will contain all operations to be performed for an ExecutionContext, though currently (DN v3.2) will process them backing store by backing store, rather than in the order they necessarily came in.
| Field Summary | |
|---|---|
protected static Localiser |
LOCALISER
|
protected List<QueuedOperation> |
queuedOperations
|
| Constructor Summary | |
|---|---|
SCOOperationQueue()
|
|
| Method Summary | |
|---|---|
void |
clear()
|
void |
enqueue(QueuedOperation oper)
Method to add the specified operation to the operation queue. |
List<QueuedOperation> |
getOperations()
Method to provide access to inspect the queued operations. |
protected static boolean |
isAddFollowedByRemoveOnSameSCO(Store store,
ObjectProvider op,
QueuedOperation currentOper,
ListIterator<QueuedOperation> 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,
QueuedOperation currentOper,
ListIterator<QueuedOperation> 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,
QueuedOperation currentOper,
ListIterator<QueuedOperation> listIter)
Convenience optimisation checker to return if the current operation is REMOVE of an element that is immediately ADDed. |
void |
performAll(Store store,
ObjectProvider op)
Method to perform all operations queued for the specified ObjectProvider and backing store. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final Localiser LOCALISER
protected List<QueuedOperation> queuedOperations
| Constructor Detail |
|---|
public SCOOperationQueue()
| Method Detail |
|---|
public void enqueue(QueuedOperation oper)
oper - Operationpublic void clear()
public List<QueuedOperation> getOperations()
public void performAll(Store store,
ObjectProvider op)
store - The backing storeop - ObjectProvider
protected static boolean isAddFollowedByRemoveOnSameSCO(Store store,
ObjectProvider op,
QueuedOperation currentOper,
ListIterator<QueuedOperation> listIter)
store - The backing storeop - The object providercurrentOper - The current operationlistIter - The iterator of operations
protected static boolean isRemoveFollowedByAddOnSameSCO(Store store,
ObjectProvider op,
QueuedOperation currentOper,
ListIterator<QueuedOperation> listIter)
store - The backing storeop - The object providercurrentOper - The current operationlistIter - The iterator of operations
protected static boolean isPutFollowedByRemoveOnSameSCO(Store store,
ObjectProvider op,
QueuedOperation currentOper,
ListIterator<QueuedOperation> listIter)
store - The backing storeop - The object providercurrentOper - The current operationlistIter - The iterator of operations
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||