public class InvalidateCommand extends RemoveCommand
| Modifier and Type | Field and Description |
|---|---|
static int |
COMMAND_ID |
protected Object[] |
keys |
notifier, value, valueEquivalence, valueMatchercommandInvocationIdkeyflags| Constructor and Description |
|---|
InvalidateCommand() |
InvalidateCommand(CacheNotifier notifier,
Set<Flag> flags,
Collection<Object> keys,
CommandInvocationId commandInvocationId) |
InvalidateCommand(CacheNotifier notifier,
Set<Flag> flags,
CommandInvocationId commandInvocationId,
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) |
Set<Object> |
getAffectedKeys() |
byte |
getCommandId()
Used by marshallers to convert this command into an id for streaming.
|
Object |
getKey() |
Object[] |
getKeys() |
Collection<Object> |
getKeysToLock()
It returns a
Collection with the keys to be lock. |
int |
hashCode() |
boolean |
ignoreCommandOnStatus(ComponentStatus status)
Similar to
VisitableCommand.shouldInvoke(InvocationContext) but evaluated by InvocationContextInterceptor. |
protected void |
invalidate(InvocationContext ctx,
Object keyToInvalidate) |
void |
notify(InvocationContext ctx,
Object removedValue,
Metadata removedMetadata,
boolean isPre) |
Object |
perform(InvocationContext ctx)
Performs an invalidation on a specified entry
|
void |
readFrom(ObjectInput input)
Reads this instance from the stream written by
ReplicableCommand.writeTo(ObjectOutput). |
boolean |
readsExistingValues() |
String |
toString() |
void |
writeTo(ObjectOutput output)
Writes this instance to the
ObjectOutput. |
getValue, getValueMatcher, init, isConditional, isNonExistent, isReturnValueExpected, isSuccessful, performRemove, setValue, setValueMatcher, updateStatusFromRemoteResponsecanBlock, getKeyLockOwner, hasSkipLocking, hasZeroLockAcquisitionsetKey, shouldInvokegetMetadata, getTopologyId, setMetadata, setTopologyIdgetFlags, setFlagsclone, finalize, getClass, notify, notifyAll, wait, wait, waitisWriteOnlyalwaysReadsExistingValues, shouldInvokegetTopologyId, setTopologyIdgetParameters, setParametersgetMetadata, setMetadatapublic static final int COMMAND_ID
protected Object[] keys
public InvalidateCommand()
public InvalidateCommand(CacheNotifier notifier, Set<Flag> flags, CommandInvocationId commandInvocationId, Object... keys)
public InvalidateCommand(CacheNotifier notifier, Set<Flag> flags, Collection<Object> keys, CommandInvocationId commandInvocationId)
public Object perform(InvocationContext ctx) throws Throwable
perform in interface ReplicableCommandperform in class RemoveCommandctx - invocation contextThrowable - in the event of problems.protected void invalidate(InvocationContext ctx, Object keyToInvalidate) throws Throwable
Throwablepublic void notify(InvocationContext ctx, Object removedValue, Metadata removedMetadata, boolean isPre)
notify in class RemoveCommandpublic byte getCommandId()
ReplicableCommandgetCommandId in interface ReplicableCommandgetCommandId in class RemoveCommandpublic String toString()
toString in class RemoveCommandpublic void writeTo(ObjectOutput output) throws IOException
ReplicableCommandObjectOutput.writeTo in interface ReplicableCommandwriteTo in class RemoveCommandoutput - the stream.IOException - if an error occurred during the I/O.public void readFrom(ObjectInput input) throws IOException, ClassNotFoundException
ReplicableCommandReplicableCommand.writeTo(ObjectOutput).readFrom in interface ReplicableCommandreadFrom in class RemoveCommandinput - the stream to read.IOException - if an error occurred during the I/O.ClassNotFoundException - if it tries to load an undefined class.public Object acceptVisitor(InvocationContext ctx, Visitor visitor) throws Throwable
VisitableCommandacceptVisitor in interface VisitableCommandacceptVisitor in class RemoveCommandctx - invocation contextvisitor - visitor to acceptThrowable - in the event of problemspublic Object getKey()
getKey in interface DataCommandgetKey in class AbstractDataCommandpublic Object[] getKeys()
public Set<Object> getAffectedKeys()
getAffectedKeys in interface WriteCommandgetAffectedKeys in class AbstractDataWriteCommandpublic Collection<Object> getKeysToLock()
RemoteLockCommandCollection with the keys to be lock.
It may return an empty collection if no keys needs to be locked independently of the return value of RemoteLockCommand.hasSkipLocking(). It may contains duplicated keys and null is not a valid return value.
getKeysToLock in interface RemoteLockCommandgetKeysToLock in class AbstractDataWriteCommandCollection of keys to lock.public boolean ignoreCommandOnStatus(ComponentStatus status)
VisitableCommandVisitableCommand.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 VisitableCommandignoreCommandOnStatus in class RemoveCommandpublic boolean readsExistingValues()
readsExistingValues in interface VisitableCommandreadsExistingValues in class RemoveCommandtrue if the command needs to read the previous values of the keys it acts on.public boolean equals(Object o)
equals in class RemoveCommandpublic int hashCode()
hashCode in class RemoveCommandCopyright © 2024 JBoss, a division of Red Hat. All rights reserved.