public interface OptimisticLockingAwareGridDialect extends GridDialect
GridDialect
facet to be implemented by those stores which support finding and altering versioned records in
an atomic fashion.Modifier and Type | Method and Description |
---|---|
boolean |
removeTupleWithOptimisticLock(EntityKey entityKey,
Tuple oldLockState,
TupleContext tupleContext)
Removes the given tuple.
|
boolean |
updateTupleWithOptimisticLock(EntityKey entityKey,
Tuple oldLockState,
Tuple tuple,
TupleContext tupleContext)
Updates the given tuple.
|
createAssociation, createTuple, forEachTuple, getAssociation, getDuplicateInsertPreventionStrategy, getLockingStrategy, getTuple, insertOrUpdateAssociation, insertOrUpdateTuple, isStoredInEntityStructure, nextValue, overrideType, removeAssociation, removeTuple, supportsSequences, usesNavigationalInformationForInverseSideOfAssociations
boolean updateTupleWithOptimisticLock(EntityKey entityKey, Tuple oldLockState, Tuple tuple, TupleContext tupleContext)
entityKey
- The key of the entity to saveoldLockState
- A tuple with all those column values identifying the previous version of the record in the
datastore. Implementations are expected to apply all the contained columns to select the record to be updated.tuple
- The entity column values to savetupleContext
- Provides additional meta-data useful for the tuple updatetrue
if the update succeeded, false
otherwise (e.g. if the entity has been updated in the
datastore in parallel, so it has a newer version then the given one).boolean removeTupleWithOptimisticLock(EntityKey entityKey, Tuple oldLockState, TupleContext tupleContext)
entityKey
- The key of the entity to saveoldLockState
- A tuple with all those column values identifying the previous version of the record in the
datastore. Implementations are expected to apply all the contained columns to select the record to be removed.tupleContext
- Provides additional meta-data useful for the tuple removaltrue
if the deletion succeeded, false
otherwise (e.g. if the entity has been removed or
updated in the datastore in parallel, so it has a newer version then the given one).Copyright © 2010-2017 Red Hat, Inc., Emmanuel Bernard and various contributors. All Rights Reserved.