@Deprecated public class OptimisticValidatorInterceptor extends OptimisticInterceptor
TransactionWorkspace
against data in the underlying data structure
(versions only) and then applies changes to the underlying data structure. This is only triggered when commit,
rollback or prepare method calls are encountered. Other method calls are directly passed up the interceptor chain,
untouched. Note that prepare/commit/rollbacks are not passed up the interceptor chain after being processed.
When preparting, this interceptor does nothing more than validate versions.
The validation scheme used is based on the DataVersion
implementation used.
DataVersion.newerThan(org.jboss.cache.optimistic.DataVersion)
is used to determine
whether the version of one instance is newer than the version of another. It is up to the DataVersion
implementation to deal with attempting to compare incompatible version types (and potentially throwing DataVersioningException
s.
Upon successful commit, changes in the workspace are applied to the underlying data structure in the cache.
On rollback clears the nodes in the workspace and leaves the underlying data structure untouched.lockManager, txManager, txTable
configuration, log, trace
Constructor and Description |
---|
OptimisticValidatorInterceptor()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
void |
initialize(DataContainer dataContainer)
Deprecated.
|
Object |
visitCommitCommand(InvocationContext ctx,
CommitCommand command)
Deprecated.
Visits a CommitCommand.
|
Object |
visitOptimisticPrepareCommand(InvocationContext ctx,
OptimisticPrepareCommand command)
Deprecated.
Visits a OptimisticPrepareCommand.
|
Object |
visitRollbackCommand(InvocationContext ctx,
RollbackCommand command)
Deprecated.
Visits a RollbackCommand.
|
getGlobalTransaction, getTransactionWorkspace, greedyGetFqns, lockAndCreateWorkspaceNode, undeleteWorkspaceNode, undeleteWorkspaceNode
getNext, handleDefault, hasNext, invokeNextInterceptor, setNext
visitClearDataCommand, visitCollection, visitCreateNodeCommand, visitEvictFqnCommand, visitExistsNodeCommand, visitGetChildrenNamesCommand, visitGetDataMapCommand, visitGetKeysCommand, visitGetKeyValueCommand, visitGetNodeCommand, visitGravitateDataCommand, visitInvalidateCommand, visitMoveCommand, visitPrepareCommand, visitPutDataMapCommand, visitPutForExternalReadCommand, visitPutKeyValueCommand, visitRemoveKeyCommand, visitRemoveNodeCommand
public OptimisticValidatorInterceptor()
public void initialize(DataContainer dataContainer)
public Object visitOptimisticPrepareCommand(InvocationContext ctx, OptimisticPrepareCommand command) throws Throwable
Visitor
visitOptimisticPrepareCommand
in interface Visitor
visitOptimisticPrepareCommand
in class AbstractVisitor
ctx
- invocation contextcommand
- command to visitThrowable
- in the event of problems.public Object visitCommitCommand(InvocationContext ctx, CommitCommand command) throws Throwable
Visitor
visitCommitCommand
in interface Visitor
visitCommitCommand
in class AbstractVisitor
ctx
- invocation contextcommand
- command to visitThrowable
- in the event of problems.public Object visitRollbackCommand(InvocationContext ctx, RollbackCommand command) throws Throwable
Visitor
visitRollbackCommand
in interface Visitor
visitRollbackCommand
in class AbstractVisitor
ctx
- invocation contextcommand
- command to visitThrowable
- in the event of problems.Copyright © 2012 JBoss, a division of Red Hat. All Rights Reserved.