public class InvalidateCommand extends RemoveCommand
Modifier and Type | Field and Description |
---|---|
static int |
COMMAND_ID |
protected Object[] |
keys |
notifier, value
key
flags
Constructor and Description |
---|
InvalidateCommand() |
InvalidateCommand(CacheNotifier notifier,
Collection<Object> keys) |
InvalidateCommand(CacheNotifier notifier,
Object... keys) |
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) |
byte |
getCommandId()
Used by marshallers to convert this command into an id for streaming.
|
Object |
getKey() |
Object[] |
getKeys() |
Object[] |
getParameters()
Used by marshallers to stream this command across a network
|
int |
hashCode() |
boolean |
ignoreCommandOnStatus(ComponentStatus status)
Similar to
VisitableCommand.shouldInvoke(InvocationContext) but evaluated by InvocationContextInterceptor . |
protected void |
invalidate(InvocationContext ctx,
Object keyToInvalidate) |
protected void |
notify(InvocationContext ctx,
Object value,
boolean isPre) |
Object |
perform(InvocationContext ctx)
Performs an invalidation on a specified entry
|
void |
setParameters(int commandId,
Object[] args)
Used by the
CommandsFactory to create a command from raw data read off a stream. |
String |
toString() |
init, isConditional, isNonExistent, isSuccessful
getAffectedKeys, isReturnValueExpected
setKey, shouldInvoke
getFlags, hasFlag, setFlags
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getFlags, hasFlag, setFlags
shouldInvoke
public static final int COMMAND_ID
protected Object[] keys
public InvalidateCommand()
public InvalidateCommand(CacheNotifier notifier, Object... keys)
public InvalidateCommand(CacheNotifier notifier, Collection<Object> keys)
public Object perform(InvocationContext ctx) throws Throwable
perform
in interface ReplicableCommand
perform
in class RemoveCommand
ctx
- invocation contextThrowable
- in the event of problems.protected void invalidate(InvocationContext ctx, Object keyToInvalidate) throws Throwable
Throwable
protected void notify(InvocationContext ctx, Object value, boolean isPre)
notify
in class RemoveCommand
public byte getCommandId()
ReplicableCommand
getCommandId
in interface ReplicableCommand
getCommandId
in class RemoveCommand
public String toString()
toString
in class RemoveCommand
public Object[] getParameters()
ReplicableCommand
getParameters
in interface ReplicableCommand
getParameters
in class RemoveCommand
public void setParameters(int commandId, Object[] args)
ReplicableCommand
CommandsFactory
to create a command from raw data read off a stream.setParameters
in interface ReplicableCommand
setParameters
in class RemoveCommand
commandId
- 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 Object acceptVisitor(InvocationContext ctx, Visitor visitor) throws Throwable
VisitableCommand
acceptVisitor
in interface VisitableCommand
acceptVisitor
in class RemoveCommand
ctx
- invocation contextvisitor
- visitor to acceptThrowable
- in the event of problemspublic Object getKey()
getKey
in interface DataCommand
getKey
in class AbstractDataCommand
public Object[] getKeys()
public boolean ignoreCommandOnStatus(ComponentStatus status)
VisitableCommand
VisitableCommand.shouldInvoke(InvocationContext)
but evaluated by InvocationContextInterceptor
.
Commands can opt to be discarded in case the cache status is not suited (as InvalidateCommand
)ignoreCommandOnStatus
in interface VisitableCommand
ignoreCommandOnStatus
in class RemoveCommand
public boolean equals(Object o)
equals
in class RemoveCommand
public int hashCode()
hashCode
in class RemoveCommand
Copyright © 2012 JBoss by Red Hat. All Rights Reserved.