Package org.infinispan.commands
Interface CommandsFactory
-
- All Known Implementing Classes:
CommandsFactoryImpl
public interface CommandsFactory
A factory to build commands, initializing and injecting dependencies accordingly. Commands built for a specific, named cache instance cannot be reused on a different cache instance since most commands contain the cache name it was built for along with references to other named-cache scoped components.- Since:
- 4.0
- Author:
- Manik Surtani, Mircea.Markus@jboss.com, Galder ZamarreƱo
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description default org.infinispan.commands.write.ApplyDeltaCommand
buildApplyDeltaCommand(Object deltaAwareValueKey, Delta delta, Collection keys)
Deprecated.since 9.1org.infinispan.commands.write.BackupAckCommand
buildBackupAckCommand(long id, int topologyId)
org.infinispan.commands.write.BackupMultiKeyAckCommand
buildBackupMultiKeyAckCommand(long id, int segment, int topologyId)
CancelCommand
buildCancelCommandCommand(UUID commandUUID)
Builds CancelCommandCommand used to cancel other commands executing on Infinispan clusterorg.infinispan.commands.write.ClearCommand
buildClearCommand(long flagsBitSet)
Builds a ClearCommandorg.infinispan.commands.remote.ClusteredGetAllCommand
buildClusteredGetAllCommand(List<?> keys, long flagsBitSet, GlobalTransaction gtx)
Builds a ClusteredGetAllCommand, which is a remote lookup commandorg.infinispan.commands.remote.ClusteredGetCommand
buildClusteredGetCommand(Object key, int segment, long flagsBitSet)
Builds a ClusteredGetCommand, which is a remote lookup commandorg.infinispan.commands.tx.CommitCommand
buildCommitCommand(GlobalTransaction gtx)
Builds a CommitCommandorg.infinispan.commands.remote.recovery.CompleteTransactionCommand
buildCompleteTransactionCommand(Xid xid, boolean commit)
Builds a CompleteTransactionCommand command.org.infinispan.commands.write.ComputeCommand
buildComputeCommand(Object key, BiFunction mappingFunction, boolean computeIfPresent, int segment, Metadata metadata, long flagsBitSet)
Builds a ComputeCommandorg.infinispan.commands.write.ComputeIfAbsentCommand
buildComputeIfAbsentCommand(Object key, Function mappingFunction, int segment, Metadata metadata, long flagsBitSet)
Builds a ComputeIfAbsentCommandCreateCacheCommand
buildCreateCacheCommand(String cacheName, String cacheConfigurationName)
Same asbuildCreateCacheCommand(cacheName, cacheConfigurationName, false, 0)
.CreateCacheCommand
buildCreateCacheCommand(String tmpCacheName, String defaultTmpCacheConfigurationName, int size)
Builds a CreateCacheCommand used to create/start cache around Infinispan cluster<T> org.infinispan.commands.read.DistributedExecuteCommand<T>
buildDistributedExecuteCommand(Callable<T> callable, Address sender, Collection keys)
Builds a DistributedExecuteCommand used for migration and execution of distributed Callables and Runnables.org.infinispan.commands.read.EntrySetCommand
buildEntrySetCommand(long flagsBitSet)
Builds a EntrySetCommandorg.infinispan.commands.write.EvictCommand
buildEvictCommand(Object key, int segment, long flagsBitSet)
Builds an EvictCommandorg.infinispan.commands.write.ExceptionAckCommand
buildExceptionAckCommand(long id, Throwable throwable, int topologyId)
org.infinispan.commands.read.GetAllCommand
buildGetAllCommand(Collection<?> keys, long flagsBitSet, boolean returnEntries)
Builds a GetAllCommandorg.infinispan.commands.read.GetCacheEntryCommand
buildGetCacheEntryCommand(Object key, int segment, long flagsBitSet)
Builds a GetCacheEntryCommandorg.infinispan.commands.remote.recovery.GetInDoubtTransactionsCommand
buildGetInDoubtTransactionsCommand()
Builds aGetInDoubtTransactionsCommand
.org.infinispan.commands.remote.recovery.GetInDoubtTxInfoCommand
buildGetInDoubtTxInfoCommand()
org.infinispan.commands.remote.GetKeysInGroupCommand
buildGetKeysInGroupCommand(long flagsBitSet, Object groupName)
BuildsGetKeysInGroupCommand
used to fetch all the keys belonging to a group.org.infinispan.commands.read.GetKeyValueCommand
buildGetKeyValueCommand(Object key, int segment, long flagsBitSet)
Builds a GetKeyValueCommandorg.infinispan.commands.write.InvalidateCommand
buildInvalidateCommand(long flagsBitSet, Object... keys)
Builds an InvalidateCommandorg.infinispan.commands.write.InvalidateCommand
buildInvalidateFromL1Command(long flagsBitSet, Collection<Object> keys)
Builds an InvalidateFromL1Commandorg.infinispan.commands.write.InvalidateCommand
buildInvalidateFromL1Command(Address origin, long flagsBitSet, Collection<Object> keys)
org.infinispan.commands.write.InvalidateVersionsCommand
buildInvalidateVersionsCommand(int topologyId, Object[] keys, int[] topologyIds, long[] versions, boolean removed)
org.infinispan.commands.read.KeySetCommand
buildKeySetCommand(long flagsBitSet)
Builds a KeySetCommandorg.infinispan.commands.control.LockControlCommand
buildLockControlCommand(Object key, long flagsBitSet, GlobalTransaction gtx)
Same asbuildLockControlCommand(Object, long, GlobalTransaction)
but for locking a single key vs a collection of keys.org.infinispan.commands.control.LockControlCommand
buildLockControlCommand(Collection<?> keys, long flagsBitSet)
org.infinispan.commands.control.LockControlCommand
buildLockControlCommand(Collection<?> keys, long flagsBitSet, GlobalTransaction gtx)
Builds a LockControlCommand to control explicit remote lockingorg.infinispan.commands.triangle.MultiEntriesFunctionalBackupWriteCommand
buildMultiEntriesFunctionalBackupWriteCommand()
org.infinispan.commands.triangle.MultiKeyFunctionalBackupWriteCommand
buildMultiKeyFunctionalBackupWriteCommand()
org.infinispan.commands.tx.PrepareCommand
buildPrepareCommand(GlobalTransaction gtx, List<org.infinispan.commands.write.WriteCommand> modifications, boolean onePhaseCommit)
Builds a PrepareCommandorg.infinispan.commands.write.PutKeyValueCommand
buildPutKeyValueCommand(Object key, Object value, int segment, Metadata metadata, long flagsBitSet)
Builds a PutKeyValueCommandorg.infinispan.commands.triangle.PutMapBackupWriteCommand
buildPutMapBackupWriteCommand()
org.infinispan.commands.write.PutMapCommand
buildPutMapCommand(Map<?,?> map, Metadata metadata, long flagsBitSet)
Builds a PutMapCommand<K,V,R>
org.infinispan.commands.functional.ReadOnlyKeyCommand<K,V,R>buildReadOnlyKeyCommand(Object key, Function<EntryView.ReadEntryView<K,V>,R> f, int segment, Params params, DataConversion keyDataConversion, DataConversion valueDataConversion)
<K,V,R>
org.infinispan.commands.functional.ReadOnlyManyCommand<K,V,R>buildReadOnlyManyCommand(Collection<?> keys, Function<EntryView.ReadEntryView<K,V>,R> f, Params params, DataConversion keyDataConversion, DataConversion valueDataConversion)
<K,V,R>
org.infinispan.commands.functional.ReadWriteKeyCommand<K,V,R>buildReadWriteKeyCommand(Object key, Function<EntryView.ReadWriteEntryView<K,V>,R> f, int segment, Params params, DataConversion keyDataConversion, DataConversion valueDataConversion)
<K,V,T,R>
org.infinispan.commands.functional.ReadWriteKeyValueCommand<K,V,T,R>buildReadWriteKeyValueCommand(Object key, Object argument, BiFunction<T,EntryView.ReadWriteEntryView<K,V>,R> f, int segment, Params params, DataConversion keyDataConversion, DataConversion valueDataConversion)
<K,V,R>
org.infinispan.commands.functional.ReadWriteManyCommand<K,V,R>buildReadWriteManyCommand(Collection<?> keys, Function<EntryView.ReadWriteEntryView<K,V>,R> f, Params params, DataConversion keyDataConversion, DataConversion valueDataConversion)
<K,V,T,R>
org.infinispan.commands.functional.ReadWriteManyEntriesCommand<K,V,T,R>buildReadWriteManyEntriesCommand(Map<?,?> entries, BiFunction<T,EntryView.ReadWriteEntryView<K,V>,R> f, Params params, DataConversion keyDataConversion, DataConversion valueDataConversion)
org.infinispan.commands.write.RemoveCommand
buildRemoveCommand(Object key, Object value, int segment, long flagsBitSet)
Builds a RemoveCommandorg.infinispan.commands.write.RemoveExpiredCommand
buildRemoveExpiredCommand(Object key, Object value, int segment, long flagsBitSet)
Builds an expired remove command that is used to remove only a specific entry when it expires via maxIdleorg.infinispan.commands.write.RemoveExpiredCommand
buildRemoveExpiredCommand(Object key, Object value, int segment, Long lifespan, long flagsBitSet)
Builds an expired remove command that is used to remove only a specific entry when it expires via lifespanorg.infinispan.commands.remote.RenewBiasCommand
buildRenewBiasCommand(Object[] keys)
org.infinispan.commands.write.ReplaceCommand
buildReplaceCommand(Object key, Object oldValue, Object newValue, int segment, Metadata metadata, long flagsBitSet)
Builds a ReplaceCommandorg.infinispan.commands.remote.RevokeBiasCommand
buildRevokeBiasCommand(Address ackTarget, long id, int topologyId, Collection<Object> keys)
org.infinispan.commands.tx.RollbackCommand
buildRollbackCommand(GlobalTransaction gtx)
Builds a RollbackCommandorg.infinispan.commands.triangle.SingleKeyBackupWriteCommand
buildSingleKeyBackupWriteCommand()
org.infinispan.commands.triangle.SingleKeyFunctionalBackupWriteCommand
buildSingleKeyFunctionalBackupWriteCommand()
org.infinispan.commands.remote.SingleRpcCommand
buildSingleRpcCommand(ReplicableCommand call)
Builds a SingleRpcCommand "envelope" containing a single ReplicableCommandSingleXSiteRpcCommand
buildSingleXSiteRpcCommand(VisitableCommand command)
Builds SingleRpcCommand used to performVisitableCommand
on the backup site,org.infinispan.commands.read.SizeCommand
buildSizeCommand(long flagsBitSet)
Builds a SizeCommandStateRequestCommand
buildStateRequestCommand(StateRequestCommand.Type subtype, Address sender, int topologyId, org.infinispan.commons.util.IntSet segments)
Builds a StateRequestCommand used for requesting transactions and locks and for starting or canceling transfer of cache entries.StateResponseCommand
buildStateResponseCommand(Address sender, int viewId, Collection<StateChunk> stateChunks, boolean applyState, boolean pushTransfer)
Builds a StateResponseCommand used for pushing cache entries to another node in response to a StateRequestCommand.StreamIteratorCloseCommand
buildStreamIteratorCloseCommand(Object id)
StreamIteratorNextCommand
buildStreamIteratorNextCommand(Object id, long batchSize)
<K> StreamIteratorRequestCommand<K>
buildStreamIteratorRequestCommand(Object id, boolean parallelStream, org.infinispan.commons.util.IntSet segments, Set<K> keys, Set<K> excludedKeys, boolean includeLoader, boolean entryStream, Iterable<org.infinispan.stream.impl.intops.IntermediateOperation> intOps, long batchSize)
<K> StreamRequestCommand<K>
buildStreamRequestCommand(Object id, boolean parallelStream, StreamRequestCommand.Type type, org.infinispan.commons.util.IntSet segments, Set<K> keys, Set<K> excludedKeys, boolean includeLoader, boolean entryStream, Object terminalOperation)
<R> StreamResponseCommand<R>
buildStreamResponseCommand(Object identifier, boolean complete, org.infinispan.commons.util.IntSet lostSegments, R response)
BuildsStreamResponseCommand
used to send back a response either intermediate or complete to the originating node with the information for the stream request.TouchCommand
buildTouchCommand(Object key, int segment)
org.infinispan.commands.remote.recovery.TxCompletionNotificationCommand
buildTxCompletionNotificationCommand(long internalId)
org.infinispan.commands.remote.recovery.TxCompletionNotificationCommand
buildTxCompletionNotificationCommand(Xid xid, GlobalTransaction globalTransaction)
Builds aTxCompletionNotificationCommand
.org.infinispan.commands.tx.VersionedCommitCommand
buildVersionedCommitCommand(GlobalTransaction gtx)
Builds a VersionedCommitCommandorg.infinispan.commands.tx.VersionedPrepareCommand
buildVersionedPrepareCommand(GlobalTransaction gtx, List<org.infinispan.commands.write.WriteCommand> modifications, boolean onePhase)
Builds a VersionedPrepareCommand<K,V>
org.infinispan.commands.functional.WriteOnlyKeyCommand<K,V>buildWriteOnlyKeyCommand(Object key, Consumer<EntryView.WriteEntryView<K,V>> f, int segment, Params params, DataConversion keyDataConversion, DataConversion valueDataConversion)
<K,V,T>
org.infinispan.commands.functional.WriteOnlyKeyValueCommand<K,V,T>buildWriteOnlyKeyValueCommand(Object key, Object argument, BiConsumer<T,EntryView.WriteEntryView<K,V>> f, int segment, Params params, DataConversion keyDataConversion, DataConversion valueDataConversion)
<K,V>
org.infinispan.commands.functional.WriteOnlyManyCommand<K,V>buildWriteOnlyManyCommand(Collection<?> keys, Consumer<EntryView.WriteEntryView<K,V>> f, Params params, DataConversion keyDataConversion, DataConversion valueDataConversion)
<K,V,T>
org.infinispan.commands.functional.WriteOnlyManyEntriesCommand<K,V,T>buildWriteOnlyManyEntriesCommand(Map<?,?> arguments, BiConsumer<T,EntryView.WriteEntryView<K,V>> f, Params params, DataConversion keyDataConversion, DataConversion valueDataConversion)
XSiteAdminCommand
buildXSiteAdminCommand(String siteName, XSiteAdminCommand.AdminOperation op, Integer afterFailures, Long minTimeToWait)
Builds XSiteAdminCommand used to perform system administrator operations.XSiteStatePushCommand
buildXSiteStatePushCommand(XSiteState[] chunk, long timeoutMillis)
Builds XSiteStatePushCommand used to transfer a single chunk of data between sites.XSiteStateTransferControlCommand
buildXSiteStateTransferControlCommand(XSiteStateTransferControlCommand.StateTransferControl control, String siteName)
Builds XSiteStateTransferControlCommand used to control the-cross site state transfer.String
getCacheName()
Retrieves the cache name this CommandFactory is set up to construct commands for.void
initializeReplicableCommand(ReplicableCommand command, boolean isRemote)
Initializes aReplicableCommand
read from a data stream with components specific to the target cache instance.
-
-
-
Method Detail
-
buildPutKeyValueCommand
org.infinispan.commands.write.PutKeyValueCommand buildPutKeyValueCommand(Object key, Object value, int segment, Metadata metadata, long flagsBitSet)
Builds a PutKeyValueCommand- Parameters:
key
- key to putvalue
- value to putsegment
- the segment of the given keymetadata
- metadata of entryflagsBitSet
- Command flags provided by cache- Returns:
- a PutKeyValueCommand
-
buildRemoveCommand
org.infinispan.commands.write.RemoveCommand buildRemoveCommand(Object key, Object value, int segment, long flagsBitSet)
Builds a RemoveCommand- Parameters:
key
- key to removevalue
- value to check for ina conditional remove, or null for an unconditional remove.segment
- the segment of the given keyflagsBitSet
- Command flags provided by cache- Returns:
- a RemoveCommand
-
buildInvalidateCommand
org.infinispan.commands.write.InvalidateCommand buildInvalidateCommand(long flagsBitSet, Object... keys)
Builds an InvalidateCommand- Parameters:
flagsBitSet
- Command flags provided by cachekeys
- keys to invalidate- Returns:
- an InvalidateCommand
-
buildInvalidateFromL1Command
org.infinispan.commands.write.InvalidateCommand buildInvalidateFromL1Command(long flagsBitSet, Collection<Object> keys)
Builds an InvalidateFromL1Command- Parameters:
flagsBitSet
- Command flags provided by cachekeys
- keys to invalidate- Returns:
- an InvalidateFromL1Command
-
buildInvalidateFromL1Command
org.infinispan.commands.write.InvalidateCommand buildInvalidateFromL1Command(Address origin, long flagsBitSet, Collection<Object> keys)
-
buildRemoveExpiredCommand
org.infinispan.commands.write.RemoveExpiredCommand buildRemoveExpiredCommand(Object key, Object value, int segment, Long lifespan, long flagsBitSet)
Builds an expired remove command that is used to remove only a specific entry when it expires via lifespan- Parameters:
key
- the key of the expired entryvalue
- the value of the entry when it was expiredsegment
- the segment of the given keylifespan
- the lifespan that expired from the commandflagsBitSet
- Command flags provided by cache- Returns:
- a RemovedExpiredCommand
-
buildRemoveExpiredCommand
org.infinispan.commands.write.RemoveExpiredCommand buildRemoveExpiredCommand(Object key, Object value, int segment, long flagsBitSet)
Builds an expired remove command that is used to remove only a specific entry when it expires via maxIdle- Parameters:
key
- the key of the expired entryvalue
- the value of the entry when it was expiredsegment
- the segment of the given keyflagsBitSet
- Command flags provided by cache- Returns:
- a RemovedExpiredCommand
-
buildReplaceCommand
org.infinispan.commands.write.ReplaceCommand buildReplaceCommand(Object key, Object oldValue, Object newValue, int segment, Metadata metadata, long flagsBitSet)
Builds a ReplaceCommand- Parameters:
key
- key to replaceoldValue
- existing value to check for if conditional, null if unconditional.newValue
- value to replace withsegment
- the segment of the given keymetadata
- metadata of entryflagsBitSet
- Command flags provided by cache- Returns:
- a ReplaceCommand
-
buildComputeCommand
org.infinispan.commands.write.ComputeCommand buildComputeCommand(Object key, BiFunction mappingFunction, boolean computeIfPresent, int segment, Metadata metadata, long flagsBitSet)
Builds a ComputeCommand- Parameters:
key
- key to compute if this key is absentmappingFunction
- BiFunction for the key and the valuecomputeIfPresent
- flag to apply as computeIfPresent modesegment
- the segment of the given keymetadata
- metadata of entryflagsBitSet
- Command flags provided by cache- Returns:
- a ComputeCommand
-
buildComputeIfAbsentCommand
org.infinispan.commands.write.ComputeIfAbsentCommand buildComputeIfAbsentCommand(Object key, Function mappingFunction, int segment, Metadata metadata, long flagsBitSet)
Builds a ComputeIfAbsentCommand- Parameters:
key
- key to compute if this key is absentmappingFunction
- mappingFunction for the keysegment
- the segment of the given keymetadata
- metadata of entryflagsBitSet
- Command flags provided by cache- Returns:
- a ComputeCommand
-
buildSizeCommand
org.infinispan.commands.read.SizeCommand buildSizeCommand(long flagsBitSet)
Builds a SizeCommand- Parameters:
flagsBitSet
- Command flags provided by cache- Returns:
- a SizeCommand
-
buildGetKeyValueCommand
org.infinispan.commands.read.GetKeyValueCommand buildGetKeyValueCommand(Object key, int segment, long flagsBitSet)
Builds a GetKeyValueCommand- Parameters:
key
- key to getsegment
- the segment of the given keyflagsBitSet
- Command flags provided by cache- Returns:
- a GetKeyValueCommand
-
buildGetCacheEntryCommand
org.infinispan.commands.read.GetCacheEntryCommand buildGetCacheEntryCommand(Object key, int segment, long flagsBitSet)
Builds a GetCacheEntryCommand- Parameters:
key
- key to getsegment
- the segment for the keyflagsBitSet
- Command flags provided by cache- Returns:
- a GetCacheEntryCommand
-
buildGetAllCommand
org.infinispan.commands.read.GetAllCommand buildGetAllCommand(Collection<?> keys, long flagsBitSet, boolean returnEntries)
Builds a GetAllCommand- Parameters:
keys
- keys to getflagsBitSet
- Command flags provided by cachereturnEntries
- boolean indicating whether entire cache entries are returned, otherwise return just the value parts- Returns:
- a GetKeyValueCommand
-
buildKeySetCommand
org.infinispan.commands.read.KeySetCommand buildKeySetCommand(long flagsBitSet)
Builds a KeySetCommand- Parameters:
flagsBitSet
- Command flags provided by cache- Returns:
- a KeySetCommand
-
buildEntrySetCommand
org.infinispan.commands.read.EntrySetCommand buildEntrySetCommand(long flagsBitSet)
Builds a EntrySetCommand- Parameters:
flagsBitSet
- Command flags provided by cache- Returns:
- a EntrySetCommand
-
buildPutMapCommand
org.infinispan.commands.write.PutMapCommand buildPutMapCommand(Map<?,?> map, Metadata metadata, long flagsBitSet)
Builds a PutMapCommand- Parameters:
map
- map containing key/value entries to putmetadata
- metadata of entryflagsBitSet
- Command flags provided by cache- Returns:
- a PutMapCommand
-
buildClearCommand
org.infinispan.commands.write.ClearCommand buildClearCommand(long flagsBitSet)
Builds a ClearCommand- Parameters:
flagsBitSet
- Command flags provided by cache- Returns:
- a ClearCommand
-
buildEvictCommand
org.infinispan.commands.write.EvictCommand buildEvictCommand(Object key, int segment, long flagsBitSet)
Builds an EvictCommand- Parameters:
key
- key to evictsegment
- the segment for the keyflagsBitSet
- Command flags provided by cache- Returns:
- an EvictCommand
-
buildPrepareCommand
org.infinispan.commands.tx.PrepareCommand buildPrepareCommand(GlobalTransaction gtx, List<org.infinispan.commands.write.WriteCommand> modifications, boolean onePhaseCommit)
Builds a PrepareCommand- Parameters:
gtx
- global transaction associated with the preparemodifications
- list of modificationsonePhaseCommit
- is this a one-phase or two-phase transaction?- Returns:
- a PrepareCommand
-
buildVersionedPrepareCommand
org.infinispan.commands.tx.VersionedPrepareCommand buildVersionedPrepareCommand(GlobalTransaction gtx, List<org.infinispan.commands.write.WriteCommand> modifications, boolean onePhase)
Builds a VersionedPrepareCommand- Parameters:
gtx
- global transaction associated with the preparemodifications
- list of modificationsonePhase
-- Returns:
- a VersionedPrepareCommand
-
buildCommitCommand
org.infinispan.commands.tx.CommitCommand buildCommitCommand(GlobalTransaction gtx)
Builds a CommitCommand- Parameters:
gtx
- global transaction associated with the commit- Returns:
- a CommitCommand
-
buildVersionedCommitCommand
org.infinispan.commands.tx.VersionedCommitCommand buildVersionedCommitCommand(GlobalTransaction gtx)
Builds a VersionedCommitCommand- Parameters:
gtx
- global transaction associated with the commit- Returns:
- a VersionedCommitCommand
-
buildRollbackCommand
org.infinispan.commands.tx.RollbackCommand buildRollbackCommand(GlobalTransaction gtx)
Builds a RollbackCommand- Parameters:
gtx
- global transaction associated with the rollback- Returns:
- a RollbackCommand
-
initializeReplicableCommand
void initializeReplicableCommand(ReplicableCommand command, boolean isRemote)
Initializes aReplicableCommand
read from a data stream with components specific to the target cache instance. Implementations should also be deep, in that if the command contains other commands, these should be recursed into.- Parameters:
command
- command to initialize. Cannot be null.isRemote
-
-
buildSingleRpcCommand
org.infinispan.commands.remote.SingleRpcCommand buildSingleRpcCommand(ReplicableCommand call)
Builds a SingleRpcCommand "envelope" containing a single ReplicableCommand- Parameters:
call
- ReplicableCommand to include in the envelope- Returns:
- a SingleRpcCommand
-
buildClusteredGetCommand
org.infinispan.commands.remote.ClusteredGetCommand buildClusteredGetCommand(Object key, int segment, long flagsBitSet)
Builds a ClusteredGetCommand, which is a remote lookup command- Parameters:
key
- key to look upsegment
- the segment for the keyflagsBitSet
- Command flags provided by cache- Returns:
- a ClusteredGetCommand
-
buildClusteredGetAllCommand
org.infinispan.commands.remote.ClusteredGetAllCommand buildClusteredGetAllCommand(List<?> keys, long flagsBitSet, GlobalTransaction gtx)
Builds a ClusteredGetAllCommand, which is a remote lookup command- Parameters:
keys
- key to look upflagsBitSet
- Command flags provided by cache- Returns:
- a ClusteredGetAllCommand
-
buildLockControlCommand
org.infinispan.commands.control.LockControlCommand buildLockControlCommand(Collection<?> keys, long flagsBitSet, GlobalTransaction gtx)
Builds a LockControlCommand to control explicit remote locking- Parameters:
keys
- keys to lockflagsBitSet
- Command flags provided by cachegtx
-- Returns:
- a LockControlCommand
-
buildLockControlCommand
org.infinispan.commands.control.LockControlCommand buildLockControlCommand(Object key, long flagsBitSet, GlobalTransaction gtx)
Same asbuildLockControlCommand(Object, long, GlobalTransaction)
but for locking a single key vs a collection of keys.
-
buildLockControlCommand
org.infinispan.commands.control.LockControlCommand buildLockControlCommand(Collection<?> keys, long flagsBitSet)
-
buildStateRequestCommand
StateRequestCommand buildStateRequestCommand(StateRequestCommand.Type subtype, Address sender, int topologyId, org.infinispan.commons.util.IntSet segments)
Builds a StateRequestCommand used for requesting transactions and locks and for starting or canceling transfer of cache entries.
-
buildStateResponseCommand
StateResponseCommand buildStateResponseCommand(Address sender, int viewId, Collection<StateChunk> stateChunks, boolean applyState, boolean pushTransfer)
Builds a StateResponseCommand used for pushing cache entries to another node in response to a StateRequestCommand.
-
getCacheName
String getCacheName()
Retrieves the cache name this CommandFactory is set up to construct commands for.- Returns:
- the name of the cache this CommandFactory is set up to construct commands for.
-
buildGetInDoubtTransactionsCommand
org.infinispan.commands.remote.recovery.GetInDoubtTransactionsCommand buildGetInDoubtTransactionsCommand()
Builds aGetInDoubtTransactionsCommand
.
-
buildTxCompletionNotificationCommand
org.infinispan.commands.remote.recovery.TxCompletionNotificationCommand buildTxCompletionNotificationCommand(Xid xid, GlobalTransaction globalTransaction)
Builds aTxCompletionNotificationCommand
.
-
buildDistributedExecuteCommand
<T> org.infinispan.commands.read.DistributedExecuteCommand<T> buildDistributedExecuteCommand(Callable<T> callable, Address sender, Collection keys)
Builds a DistributedExecuteCommand used for migration and execution of distributed Callables and Runnables.- Parameters:
callable
- the callable tasksender
- sender's Addresskeys
- keys used in Callable- Returns:
- a DistributedExecuteCommand
-
buildGetInDoubtTxInfoCommand
org.infinispan.commands.remote.recovery.GetInDoubtTxInfoCommand buildGetInDoubtTxInfoCommand()
- See Also:
GetInDoubtTxInfoCommand
-
buildCompleteTransactionCommand
org.infinispan.commands.remote.recovery.CompleteTransactionCommand buildCompleteTransactionCommand(Xid xid, boolean commit)
Builds a CompleteTransactionCommand command.- Parameters:
xid
- the xid identifying the transaction we want to complete.commit
- commit(true) or rollback(false)?
-
buildTxCompletionNotificationCommand
org.infinispan.commands.remote.recovery.TxCompletionNotificationCommand buildTxCompletionNotificationCommand(long internalId)
- Parameters:
internalId
- the internal id identifying the transaction to be removed.- See Also:
TxCompletionNotificationCommand
-
buildApplyDeltaCommand
@Deprecated default org.infinispan.commands.write.ApplyDeltaCommand buildApplyDeltaCommand(Object deltaAwareValueKey, Delta delta, Collection keys)
Deprecated.since 9.1Builds a ApplyDeltaCommand used for applying Delta objects to DeltaAware containers stored in cache- Returns:
- ApplyDeltaCommand instance
- See Also:
ApplyDeltaCommand
-
buildCreateCacheCommand
CreateCacheCommand buildCreateCacheCommand(String cacheName, String cacheConfigurationName)
Same asbuildCreateCacheCommand(cacheName, cacheConfigurationName, false, 0)
.
-
buildCreateCacheCommand
CreateCacheCommand buildCreateCacheCommand(String tmpCacheName, String defaultTmpCacheConfigurationName, int size)
Builds a CreateCacheCommand used to create/start cache around Infinispan cluster- Parameters:
size
- Ifsize > 0
, the command will wait until the cache runs on at leastsize
nodes.
-
buildCancelCommandCommand
CancelCommand buildCancelCommandCommand(UUID commandUUID)
Builds CancelCommandCommand used to cancel other commands executing on Infinispan cluster- Parameters:
commandUUID
- UUID for command to cancel- Returns:
- created CancelCommandCommand
-
buildXSiteStateTransferControlCommand
XSiteStateTransferControlCommand buildXSiteStateTransferControlCommand(XSiteStateTransferControlCommand.StateTransferControl control, String siteName)
Builds XSiteStateTransferControlCommand used to control the-cross site state transfer.- Parameters:
control
- the control operationsiteName
- the site name, needed for some control operations.- Returns:
- the XSiteStateTransferControlCommand created
-
buildXSiteAdminCommand
XSiteAdminCommand buildXSiteAdminCommand(String siteName, XSiteAdminCommand.AdminOperation op, Integer afterFailures, Long minTimeToWait)
Builds XSiteAdminCommand used to perform system administrator operations.- Returns:
- the XSiteAdminCommand created
-
buildXSiteStatePushCommand
XSiteStatePushCommand buildXSiteStatePushCommand(XSiteState[] chunk, long timeoutMillis)
Builds XSiteStatePushCommand used to transfer a single chunk of data between sites.- Parameters:
chunk
- the data chunktimeoutMillis
- timeout in milliseconds, for the retries in the receiver site.- Returns:
- the XSiteStatePushCommand created
-
buildSingleXSiteRpcCommand
SingleXSiteRpcCommand buildSingleXSiteRpcCommand(VisitableCommand command)
Builds SingleRpcCommand used to performVisitableCommand
on the backup site,- Parameters:
command
- the visitable command.- Returns:
- the SingleXSiteRpcCommand created
-
buildGetKeysInGroupCommand
org.infinispan.commands.remote.GetKeysInGroupCommand buildGetKeysInGroupCommand(long flagsBitSet, Object groupName)
BuildsGetKeysInGroupCommand
used to fetch all the keys belonging to a group.- Parameters:
flagsBitSet
- Command flags provided by cachegroupName
- the group name.- Returns:
- the GetKeysInGroup created.
-
buildStreamRequestCommand
<K> StreamRequestCommand<K> buildStreamRequestCommand(Object id, boolean parallelStream, StreamRequestCommand.Type type, org.infinispan.commons.util.IntSet segments, Set<K> keys, Set<K> excludedKeys, boolean includeLoader, boolean entryStream, Object terminalOperation)
-
buildStreamResponseCommand
<R> StreamResponseCommand<R> buildStreamResponseCommand(Object identifier, boolean complete, org.infinispan.commons.util.IntSet lostSegments, R response)
BuildsStreamResponseCommand
used to send back a response either intermediate or complete to the originating node with the information for the stream request.- Type Parameters:
R
- type of response- Parameters:
identifier
- the unique identifier for the stream requestcomplete
- whether or not this is an intermediate or final response from this node for the given idlostSegments
- what segments that were lost during processingresponse
- the actual response- Returns:
- the command to send back the response
-
buildStreamIteratorRequestCommand
<K> StreamIteratorRequestCommand<K> buildStreamIteratorRequestCommand(Object id, boolean parallelStream, org.infinispan.commons.util.IntSet segments, Set<K> keys, Set<K> excludedKeys, boolean includeLoader, boolean entryStream, Iterable<org.infinispan.stream.impl.intops.IntermediateOperation> intOps, long batchSize)
-
buildStreamIteratorNextCommand
StreamIteratorNextCommand buildStreamIteratorNextCommand(Object id, long batchSize)
-
buildStreamIteratorCloseCommand
StreamIteratorCloseCommand buildStreamIteratorCloseCommand(Object id)
-
buildReadOnlyKeyCommand
<K,V,R> org.infinispan.commands.functional.ReadOnlyKeyCommand<K,V,R> buildReadOnlyKeyCommand(Object key, Function<EntryView.ReadEntryView<K,V>,R> f, int segment, Params params, DataConversion keyDataConversion, DataConversion valueDataConversion)
-
buildReadOnlyManyCommand
<K,V,R> org.infinispan.commands.functional.ReadOnlyManyCommand<K,V,R> buildReadOnlyManyCommand(Collection<?> keys, Function<EntryView.ReadEntryView<K,V>,R> f, Params params, DataConversion keyDataConversion, DataConversion valueDataConversion)
-
buildWriteOnlyKeyCommand
<K,V> org.infinispan.commands.functional.WriteOnlyKeyCommand<K,V> buildWriteOnlyKeyCommand(Object key, Consumer<EntryView.WriteEntryView<K,V>> f, int segment, Params params, DataConversion keyDataConversion, DataConversion valueDataConversion)
-
buildReadWriteKeyValueCommand
<K,V,T,R> org.infinispan.commands.functional.ReadWriteKeyValueCommand<K,V,T,R> buildReadWriteKeyValueCommand(Object key, Object argument, BiFunction<T,EntryView.ReadWriteEntryView<K,V>,R> f, int segment, Params params, DataConversion keyDataConversion, DataConversion valueDataConversion)
-
buildReadWriteKeyCommand
<K,V,R> org.infinispan.commands.functional.ReadWriteKeyCommand<K,V,R> buildReadWriteKeyCommand(Object key, Function<EntryView.ReadWriteEntryView<K,V>,R> f, int segment, Params params, DataConversion keyDataConversion, DataConversion valueDataConversion)
-
buildWriteOnlyManyEntriesCommand
<K,V,T> org.infinispan.commands.functional.WriteOnlyManyEntriesCommand<K,V,T> buildWriteOnlyManyEntriesCommand(Map<?,?> arguments, BiConsumer<T,EntryView.WriteEntryView<K,V>> f, Params params, DataConversion keyDataConversion, DataConversion valueDataConversion)
-
buildWriteOnlyKeyValueCommand
<K,V,T> org.infinispan.commands.functional.WriteOnlyKeyValueCommand<K,V,T> buildWriteOnlyKeyValueCommand(Object key, Object argument, BiConsumer<T,EntryView.WriteEntryView<K,V>> f, int segment, Params params, DataConversion keyDataConversion, DataConversion valueDataConversion)
-
buildWriteOnlyManyCommand
<K,V> org.infinispan.commands.functional.WriteOnlyManyCommand<K,V> buildWriteOnlyManyCommand(Collection<?> keys, Consumer<EntryView.WriteEntryView<K,V>> f, Params params, DataConversion keyDataConversion, DataConversion valueDataConversion)
-
buildReadWriteManyCommand
<K,V,R> org.infinispan.commands.functional.ReadWriteManyCommand<K,V,R> buildReadWriteManyCommand(Collection<?> keys, Function<EntryView.ReadWriteEntryView<K,V>,R> f, Params params, DataConversion keyDataConversion, DataConversion valueDataConversion)
-
buildReadWriteManyEntriesCommand
<K,V,T,R> org.infinispan.commands.functional.ReadWriteManyEntriesCommand<K,V,T,R> buildReadWriteManyEntriesCommand(Map<?,?> entries, BiFunction<T,EntryView.ReadWriteEntryView<K,V>,R> f, Params params, DataConversion keyDataConversion, DataConversion valueDataConversion)
-
buildBackupAckCommand
org.infinispan.commands.write.BackupAckCommand buildBackupAckCommand(long id, int topologyId)
-
buildBackupMultiKeyAckCommand
org.infinispan.commands.write.BackupMultiKeyAckCommand buildBackupMultiKeyAckCommand(long id, int segment, int topologyId)
-
buildExceptionAckCommand
org.infinispan.commands.write.ExceptionAckCommand buildExceptionAckCommand(long id, Throwable throwable, int topologyId)
-
buildInvalidateVersionsCommand
org.infinispan.commands.write.InvalidateVersionsCommand buildInvalidateVersionsCommand(int topologyId, Object[] keys, int[] topologyIds, long[] versions, boolean removed)
-
buildRevokeBiasCommand
org.infinispan.commands.remote.RevokeBiasCommand buildRevokeBiasCommand(Address ackTarget, long id, int topologyId, Collection<Object> keys)
-
buildRenewBiasCommand
org.infinispan.commands.remote.RenewBiasCommand buildRenewBiasCommand(Object[] keys)
-
buildSingleKeyBackupWriteCommand
org.infinispan.commands.triangle.SingleKeyBackupWriteCommand buildSingleKeyBackupWriteCommand()
-
buildSingleKeyFunctionalBackupWriteCommand
org.infinispan.commands.triangle.SingleKeyFunctionalBackupWriteCommand buildSingleKeyFunctionalBackupWriteCommand()
-
buildPutMapBackupWriteCommand
org.infinispan.commands.triangle.PutMapBackupWriteCommand buildPutMapBackupWriteCommand()
-
buildMultiEntriesFunctionalBackupWriteCommand
org.infinispan.commands.triangle.MultiEntriesFunctionalBackupWriteCommand buildMultiEntriesFunctionalBackupWriteCommand()
-
buildMultiKeyFunctionalBackupWriteCommand
org.infinispan.commands.triangle.MultiKeyFunctionalBackupWriteCommand buildMultiKeyFunctionalBackupWriteCommand()
-
buildTouchCommand
TouchCommand buildTouchCommand(Object key, int segment)
-
-