public class PutKeyValueCommand extends AbstractVersionedDataCommand
Cache.put(org.jboss.cache.Fqn, Object, Object).| Modifier and Type | Field and Description |
|---|---|
protected Object |
key |
static int |
METHOD_ID |
protected Object |
value |
static int |
VERSIONED_METHOD_ID |
dataVersion, globalTransaction, notifierdataContainer, fqn| Constructor and Description |
|---|
PutKeyValueCommand() |
PutKeyValueCommand(GlobalTransaction gtx,
Fqn fqn,
Object key,
Object value) |
| Modifier and Type | Method and Description |
|---|---|
Object |
acceptVisitor(InvocationContext ctx,
Visitor visitor)
Accept a visitor, and return the result of accepting this visitor.
|
boolean |
equals(Object o) |
int |
getCommandId()
Used by marshallers to convert this command into an id for streaming.
|
Object |
getKey() |
Object[] |
getParameters()
Basic versions of these methods
|
Object |
getValue() |
int |
hashCode() |
protected boolean |
isVersionedId(int commandId) |
Object |
perform(InvocationContext ctx)
Puts the specified key and value into the data map in the node referenced by the specified Fqn.
|
void |
setKey(Object key) |
void |
setParameters(int commandId,
Object[] args)
Basic versions of these methods
|
void |
setValue(Object value) |
String |
toString() |
getDataVersion, getGlobalTransaction, initialize, isVersioned, peekVersioned, setDataVersion, setGlobalTransactiongetFqn, initializeclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetFqnpublic static final int METHOD_ID
public static final int VERSIONED_METHOD_ID
protected Object key
protected Object value
public PutKeyValueCommand(GlobalTransaction gtx, Fqn fqn, Object key, Object value)
public PutKeyValueCommand()
public Object perform(InvocationContext ctx)
ctx - invocation contextpublic Object acceptVisitor(InvocationContext ctx, Visitor visitor) throws Throwable
VisitableCommandctx - invocation contextvisitor - visitor to acceptThrowable - in the event of problemspublic Object getKey()
public Object getValue()
public void setKey(Object key)
public void setValue(Object value)
public int getCommandId()
ReplicableCommandpublic Object[] getParameters()
AbstractDataCommandgetParameters in interface ReplicableCommandgetParameters in class AbstractVersionedDataCommandpublic void setParameters(int commandId,
Object[] args)
AbstractDataCommandsetParameters in interface ReplicableCommandsetParameters in class AbstractVersionedDataCommandcommandId - 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 argspublic boolean equals(Object o)
equals in class AbstractVersionedDataCommandpublic int hashCode()
hashCode in class AbstractVersionedDataCommandprotected boolean isVersionedId(int commandId)
isVersionedId in class AbstractVersionedDataCommandpublic String toString()
toString in class AbstractDataCommandCopyright © 2012 JBoss, a division of Red Hat. All Rights Reserved.