public final class ReadOnlyKeyCommand<K,V,R> extends AbstractDataCommand implements LocalCommand
keyflags| Constructor and Description |
|---|
ReadOnlyKeyCommand() |
ReadOnlyKeyCommand(Object key,
Function<EntryView.ReadEntryView<K,V>,R> f) |
| Modifier and Type | Method and Description |
|---|---|
Object |
acceptVisitor(InvocationContext ctx,
Visitor visitor)
Accept a visitor, and return the result of accepting this visitor.
|
boolean |
alwaysReadsExistingValues() |
byte |
getCommandId()
Used by marshallers to convert this command into an id for streaming.
|
Object |
perform(CacheEntry<K,V> entry) |
Object |
perform(InvocationContext ctx)
Performs the primary function of the command.
|
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. |
canBlock, equals, getKey, hashCode, ignoreCommandOnStatus, isReturnValueExpected, setKey, shouldInvokegetMetadata, getTopologyId, setMetadata, setTopologyIdgetFlags, setFlagsclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetTopologyId, setTopologyIdgetParameters, setParameterspublic ReadOnlyKeyCommand(Object key, Function<EntryView.ReadEntryView<K,V>,R> f)
public ReadOnlyKeyCommand()
public byte getCommandId()
ReplicableCommandgetCommandId in interface ReplicableCommandpublic void writeTo(ObjectOutput output) throws IOException
ReplicableCommandObjectOutput.writeTo in interface ReplicableCommandoutput - 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 ReplicableCommandinput - the stream to read.IOException - if an error occurred during the I/O.ClassNotFoundException - if it tries to load an undefined class.public Object perform(InvocationContext ctx) throws Throwable
ReplicableCommandperform in interface ReplicableCommandctx - invocation contextThrowable - in the event of problems.public Object perform(CacheEntry<K,V> entry)
public Object acceptVisitor(InvocationContext ctx, Visitor visitor) throws Throwable
VisitableCommandacceptVisitor in interface VisitableCommandctx - invocation contextvisitor - visitor to acceptThrowable - in the event of problemspublic boolean readsExistingValues()
readsExistingValues in interface VisitableCommandtrue if the command needs to read the previous values of the keys it acts on.public boolean alwaysReadsExistingValues()
alwaysReadsExistingValues in interface VisitableCommandtrue if the command needs to read the previous values even on the backup owners.
In transactional caches, this refers to all the owners except the originator.public String toString()
toString in class AbstractDataCommandCopyright © 2024 JBoss, a division of Red Hat. All rights reserved.