Package org.infinispan.commands.read
Class KeySetCommand<K,V>
- java.lang.Object
-
- org.infinispan.commands.AbstractFlagAffectedCommand
-
- org.infinispan.commands.read.AbstractLocalCommand
-
- org.infinispan.commands.read.KeySetCommand<K,V>
-
- All Implemented Interfaces:
FlagAffectedCommand
,LocalCommand
,ReplicableCommand
,VisitableCommand
public class KeySetCommand<K,V> extends AbstractLocalCommand implements VisitableCommand
Command implementation forMap.keySet()
functionality.- Since:
- 4.0
- Author:
- Galder ZamarreƱo, Mircea.Markus@jboss.com, Trustin Lee, William Burns
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.infinispan.commands.VisitableCommand
VisitableCommand.LoadType
-
-
Constructor Summary
Constructors Constructor Description KeySetCommand(Cache<K,V> cache, InternalDataContainer<K,V> dataContainer, KeyPartitioner keyPartitioner, long flagsBitSet)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
acceptVisitor(InvocationContext ctx, Visitor visitor)
Accept a visitor, and return the result of accepting this visitor.VisitableCommand.LoadType
loadType()
Set<K>
perform(InvocationContext ctx)
Performs the primary function of the command.String
toString()
-
Methods inherited from class org.infinispan.commands.read.AbstractLocalCommand
canBlock, getCommandId, isReturnValueExpected, readFrom, writeTo
-
Methods inherited from class org.infinispan.commands.AbstractFlagAffectedCommand
getFlagsBitSet, hasSameFlags, printFlags, setFlagsBitSet
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.infinispan.commands.FlagAffectedCommand
addFlag, addFlags, addFlags, getFlags, hasAnyFlag, hasFlag, setFlags
-
Methods inherited from interface org.infinispan.commands.ReplicableCommand
canBlock, getCommandId, invoke, invokeAsync, isReturnValueExpected, isSuccessful, readFrom, setOrigin, writeTo
-
Methods inherited from interface org.infinispan.commands.VisitableCommand
ignoreCommandOnStatus, shouldInvoke
-
-
-
-
Constructor Detail
-
KeySetCommand
public KeySetCommand(Cache<K,V> cache, InternalDataContainer<K,V> dataContainer, KeyPartitioner keyPartitioner, long flagsBitSet)
-
-
Method Detail
-
acceptVisitor
public Object acceptVisitor(InvocationContext ctx, Visitor visitor) throws Throwable
Description copied from interface:VisitableCommand
Accept a visitor, and return the result of accepting this visitor.- Specified by:
acceptVisitor
in interfaceVisitableCommand
- Parameters:
ctx
- invocation contextvisitor
- visitor to accept- Returns:
- arbitrary return value
- Throws:
Throwable
- in the event of problems
-
loadType
public VisitableCommand.LoadType loadType()
- Specified by:
loadType
in interfaceVisitableCommand
- Returns:
- Nodes on which the command needs to read the previous values of the keys it acts on.
-
perform
public Set<K> perform(InvocationContext ctx) throws Throwable
Description copied from interface:VisitableCommand
Performs the primary function of the command. Please see specific implementation classes for details on what is performed as well as return types. Important: this method will be invoked at the end of interceptors chain. It should never be called directly from a custom interceptor.- Specified by:
perform
in interfaceReplicableCommand
- Specified by:
perform
in interfaceVisitableCommand
- Parameters:
ctx
- invocation context- Returns:
- arbitrary return value generated by performing this command
- Throws:
Throwable
- in the event of problems.
-
-