public abstract class AbstractVersionedDataCommand extends AbstractDataCommand implements VersionedDataCommand
DataCommand which handles common behaviour| Modifier and Type | Field and Description |
|---|---|
protected DataVersion |
dataVersion |
protected GlobalTransaction |
globalTransaction |
protected Notifier |
notifier |
dataContainer, fqn| Constructor and Description |
|---|
AbstractVersionedDataCommand() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
DataVersion |
getDataVersion() |
GlobalTransaction |
getGlobalTransaction() |
Object[] |
getParameters()
Basic versions of these methods
|
int |
hashCode() |
void |
initialize(Notifier notifier,
DataContainer dataContainer) |
boolean |
isVersioned()
Has data version set? (i.e.
|
protected abstract boolean |
isVersionedId(int id) |
protected NodeSPI |
peekVersioned(InvocationContext ctx)
Utility method to peek a node and throw an exception if the version isn't what is expected.
|
void |
setDataVersion(DataVersion dataVersion)
Sets the DataVersion pertaining to this command.
|
void |
setGlobalTransaction(GlobalTransaction globalTransaction)
Sets a GlobalTransaction on this command.
|
void |
setParameters(int commandId,
Object[] args)
Basic versions of these methods
|
getFqn, initialize, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetFqnacceptVisitorgetCommandId, performprotected Notifier notifier
protected DataVersion dataVersion
protected GlobalTransaction globalTransaction
public void initialize(Notifier notifier, DataContainer dataContainer)
public DataVersion getDataVersion()
getDataVersion in interface VersionedDataCommandpublic void setDataVersion(DataVersion dataVersion)
VersionedDataCommandsetDataVersion in interface VersionedDataCommanddataVersion - to setpublic GlobalTransaction getGlobalTransaction()
getGlobalTransaction in interface WriteCommandpublic void setGlobalTransaction(GlobalTransaction globalTransaction)
WriteCommandsetGlobalTransaction in interface WriteCommandglobalTransaction - global transaction to setpublic boolean isVersioned()
VersionedDataCommandisVersioned in interface VersionedDataCommandpublic Object[] getParameters()
AbstractDataCommandgetParameters in interface ReplicableCommandgetParameters in class AbstractDataCommandpublic void setParameters(int commandId,
Object[] args)
AbstractDataCommandsetParameters in interface ReplicableCommandsetParameters in class AbstractDataCommandcommandId - command id to set. This is usually unused but *could* be used in the event of a command having multiple IDs, such as PutKeyValueCommand.args - object array of argsprotected abstract boolean isVersionedId(int id)
public boolean equals(Object o)
equals in class AbstractDataCommandpublic int hashCode()
hashCode in class AbstractDataCommandprotected NodeSPI peekVersioned(InvocationContext ctx)
ctx - context to useDataVersioningException - if there is a version mismatchCopyright © 2012 JBoss, a division of Red Hat. All Rights Reserved.