Class AbstractWriteKeyCommand<K,V>
java.lang.Object
org.infinispan.commands.read.AbstractDataCommand
org.infinispan.commands.write.AbstractDataWriteCommand
org.infinispan.commands.functional.AbstractWriteKeyCommand<K,V>
- All Implemented Interfaces:
DataCommand,FlagAffectedCommand,FunctionalCommand<K,,V> ReplicableCommand,SegmentSpecificCommand,TopologyAffectedCommand,TracedCommand,VisitableCommand,DataWriteCommand,WriteCommand,RemoteLockCommand
- Direct Known Subclasses:
ReadWriteKeyCommand,ReadWriteKeyValueCommand,WriteOnlyKeyCommand,WriteOnlyKeyValueCommand
public abstract class AbstractWriteKeyCommand<K,V>
extends AbstractDataWriteCommand
implements FunctionalCommand<K,V>
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.infinispan.commands.VisitableCommand
VisitableCommand.LoadType -
Field Summary
Fields inherited from class org.infinispan.commands.write.AbstractDataWriteCommand
commandInvocationIdFields inherited from class org.infinispan.commands.read.AbstractDataCommand
key, segment -
Constructor Summary
ConstructorsConstructorDescriptionAbstractWriteKeyCommand(Object key, ValueMatcher valueMatcher, int segment, CommandInvocationId id, Params params, DataConversion keyDataConversion, DataConversion valueDataConversion) -
Method Summary
Modifier and TypeMethodDescriptionvoidfail()Make subsequent invocations ofWriteCommand.isSuccessful()returnfalse.voidinit(ComponentRegistry componentRegistry) booleanSome commands may want to provide information on whether the command was successful or not.voidsetInternalMetadata(PrivateMetadata internalMetadata) voidsetValueMatcher(ValueMatcher valueMatcher) toString()Methods inherited from class org.infinispan.commands.write.AbstractDataWriteCommand
getAffectedKeys, getCommandInvocationId, getKeyLockOwner, getKeysToLock, hasSkipLocking, hasZeroLockAcquisition, isReturnValueExpectedMethods inherited from class org.infinispan.commands.read.AbstractDataCommand
equals, getFlagsBitSet, getKey, getSegment, getTopologyId, hashCode, printFlags, setFlagsBitSet, setKey, setTopologyIdMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.infinispan.commands.DataCommand
getKeyMethods inherited from interface org.infinispan.commands.write.DataWriteCommand
getInternalMetadata, setInternalMetadataMethods inherited from interface org.infinispan.commands.FlagAffectedCommand
addFlags, getFlags, getFlagsBitSet, hasAllFlags, hasAnyFlag, setFlagsBitSetMethods inherited from interface org.infinispan.commands.functional.FunctionalCommand
toMutationMethods inherited from interface org.infinispan.commands.ReplicableCommand
canBlock, getCommandId, invoke, invokeAsync, logThrowable, readFrom, setOrigin, writeToMethods inherited from interface org.infinispan.commands.SegmentSpecificCommand
getSegmentMethods inherited from interface org.infinispan.commands.TopologyAffectedCommand
getTopologyId, setTopologyIdMethods inherited from interface org.infinispan.commands.TracedCommand
getOperationName, getSpanAttributes, setSpanAttributesMethods inherited from interface org.infinispan.commands.VisitableCommand
acceptVisitor, loadTypeMethods inherited from interface org.infinispan.commands.write.WriteCommand
isConditional, isWriteOnly, shouldReplicate
-
Constructor Details
-
AbstractWriteKeyCommand
public AbstractWriteKeyCommand(Object key, ValueMatcher valueMatcher, int segment, CommandInvocationId id, Params params, DataConversion keyDataConversion, DataConversion valueDataConversion) -
AbstractWriteKeyCommand
public AbstractWriteKeyCommand()
-
-
Method Details
-
init
- Specified by:
initin interfaceVisitableCommand
-
getValueMatcher
- Specified by:
getValueMatcherin interfaceWriteCommand- Returns:
- The current value matching policy.
-
setValueMatcher
- Specified by:
setValueMatcherin interfaceWriteCommand- Parameters:
valueMatcher- The new value matching policy.
-
isSuccessful
public boolean isSuccessful()Description copied from interface:WriteCommandSome commands may want to provide information on whether the command was successful or not. This is different from a failure, which usually would result in an exception being thrown. An example is a putIfAbsent() not doing anything because the key in question was present. This would result in a isSuccessful() call returning false.- Specified by:
isSuccessfulin interfaceReplicableCommand- Specified by:
isSuccessfulin interfaceWriteCommand- Returns:
- true if the command completed successfully, false otherwise.
-
getParams
- Specified by:
getParamsin interfaceFunctionalCommand<K,V>
-
fail
public void fail()Description copied from interface:WriteCommandMake subsequent invocations ofWriteCommand.isSuccessful()returnfalse.- Specified by:
failin interfaceWriteCommand
-
toString
- Overrides:
toStringin classAbstractDataCommand
-
getKeyDataConversion
- Specified by:
getKeyDataConversionin interfaceFunctionalCommand<K,V>
-
getValueDataConversion
- Specified by:
getValueDataConversionin interfaceFunctionalCommand<K,V>
-
getInternalMetadata
- Specified by:
getInternalMetadatain interfaceDataWriteCommand
-
setInternalMetadata
- Specified by:
setInternalMetadatain interfaceDataWriteCommand
-