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.
Commands returned by the various build*Command methods should be initialised sufficiently for local execution via the
interceptor chain, with no calls to initializeReplicableCommand(ReplicableCommand, boolean)
required.
However, for remote execution, it's assumed that a command will be initialized via initializeReplicableCommand(ReplicableCommand, boolean)
before being invoked.
Note, InitializableCommand
implementations should not rely on access to the ComponentRegistry
in their constructors for local execution initialization as this leads to
duplicated code. Instead implementations of this interface should call InitializableCommand.init(ComponentRegistry, boolean)
before returning the created command.
- Since:
- 4.0
- Author:
- Manik Surtani, Mircea.Markus@jboss.com, Galder ZamarreƱo
-
Method Summary
Modifier and TypeMethodDescriptionorg.infinispan.commands.write.BackupAckCommand
buildBackupAckCommand
(long id, int topologyId) org.infinispan.commands.write.BackupMultiKeyAckCommand
buildBackupMultiKeyAckCommand
(long id, int segment, int topologyId) org.infinispan.commands.triangle.BackupNoopCommand
org.infinispan.reactive.publisher.impl.commands.batch.CancelPublisherCommand
buildCancelPublisherCommand
(String requestId) org.infinispan.commands.remote.CheckTransactionRpcCommand
buildCheckTransactionRpcCommand
(Collection<GlobalTransaction> globalTransactions) org.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, Integer segment, long flagsBitSet) Builds a ClusteredGetCommand, which is a remote lookup commandorg.infinispan.commands.tx.CommitCommand
Builds a CommitCommandorg.infinispan.commands.remote.recovery.CompleteTransactionCommand
buildCompleteTransactionCommand
(XidImpl 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 ComputeIfAbsentCommandorg.infinispan.commands.statetransfer.ConflictResolutionStartCommand
buildConflictResolutionStartCommand
(int topologyId, IntSet segments) <K,
V, R> org.infinispan.reactive.publisher.impl.commands.reduction.ReductionPublisherRequestCommand <K> buildEntryReductionPublisherCommand
(boolean parallelStream, DeliveryGuarantee deliveryGuarantee, IntSet segments, Set<K> keys, Set<K> excludedKeys, long explicitFlags, Function<? super org.reactivestreams.Publisher<CacheEntry<K, V>>, ? extends CompletionStage<R>> transformer, Function<? super org.reactivestreams.Publisher<R>, ? extends CompletionStage<R>> finalizer) 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
Builds aGetInDoubtTransactionsCommand
.org.infinispan.commands.remote.recovery.GetInDoubtTxInfoCommand
org.infinispan.commands.read.GetKeyValueCommand
buildGetKeyValueCommand
(Object key, int segment, long flagsBitSet) Builds a GetKeyValueCommand<K,
I, R> org.infinispan.reactive.publisher.impl.commands.batch.InitialPublisherCommand <K, I, R> buildInitialPublisherCommand
(String requestId, DeliveryGuarantee deliveryGuarantee, int batchSize, IntSet segments, Set<K> keys, Set<K> excludedKeys, long explicitFlags, boolean entryStream, boolean trackKeys, Function<? super org.reactivestreams.Publisher<I>, ? extends org.reactivestreams.Publisher<R>> transformer) org.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.irac.IracCleanupKeysCommand
buildIracCleanupKeyCommand
(Collection<? extends IracManagerKeyInfo> state) org.infinispan.commands.irac.IracMetadataRequestCommand
buildIracMetadataRequestCommand
(int segment, IracEntryVersion versionSeen) org.infinispan.commands.write.IracPutKeyValueCommand
buildIracPutKeyValueCommand
(Object key, int segment, Object value, Metadata metadata, PrivateMetadata privateMetadata) buildIracPutManyCommand
(int capacity) org.infinispan.commands.irac.IracRequestStateCommand
buildIracRequestStateCommand
(IntSet segments) org.infinispan.commands.irac.IracStateResponseCommand
buildIracStateResponseCommand
(int capacity) org.infinispan.commands.irac.IracTombstoneCleanupCommand
buildIracTombstoneCleanupCommand
(int maxCapacity) org.infinispan.commands.irac.IracTombstonePrimaryCheckCommand
org.infinispan.commands.irac.IracTombstoneRemoteSiteCheckCommand
org.infinispan.commands.irac.IracTombstoneStateResponseCommand
org.infinispan.commands.irac.IracUpdateVersionCommand
buildIracUpdateVersionCommand
(Map<Integer, IracEntryVersion> segmentsVersion) <K,
R> org.infinispan.reactive.publisher.impl.commands.reduction.ReductionPublisherRequestCommand <K> buildKeyReductionPublisherCommand
(boolean parallelStream, DeliveryGuarantee deliveryGuarantee, IntSet segments, Set<K> keys, Set<K> excludedKeys, long explicitFlags, Function<? super org.reactivestreams.Publisher<K>, ? extends CompletionStage<R>> transformer, Function<? super org.reactivestreams.Publisher<R>, ? extends CompletionStage<R>> finalizer) org.infinispan.commands.read.KeySetCommand
buildKeySetCommand
(long flagsBitSet) Builds a KeySetCommandorg.infinispan.commands.control.LockControlCommand
buildLockControlCommand
(Object key, long flagsBitSet, GlobalTransaction gtx) Same asbuildLockControlCommand(Collection, 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 locking<K,
V> MultiClusterEventCommand <K, V> buildMultiClusterEventCommand
(Map<UUID, Collection<ClusterEvent<K, V>>> events) org.infinispan.commands.triangle.MultiEntriesFunctionalBackupWriteCommand
org.infinispan.commands.triangle.MultiKeyFunctionalBackupWriteCommand
org.infinispan.reactive.publisher.impl.commands.batch.NextPublisherCommand
buildNextPublisherCommand
(String requestId) org.infinispan.commands.tx.PrepareCommand
buildPrepareCommand
(GlobalTransaction gtx, List<org.infinispan.commands.write.WriteCommand> modifications, boolean onePhaseCommit) Builds a PrepareCommanddefault org.infinispan.commands.write.PutKeyValueCommand
buildPutKeyValueCommand
(Object key, Object value, int segment, Metadata metadata, long flagsBitSet) Builds a PutKeyValueCommandorg.infinispan.commands.write.PutKeyValueCommand
buildPutKeyValueCommand
(Object key, Object value, int segment, Metadata metadata, long flagsBitSet, boolean returnEntry) org.infinispan.commands.triangle.PutMapBackupWriteCommand
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) default org.infinispan.commands.write.RemoveCommand
buildRemoveCommand
(Object key, Object value, int segment, long flagsBitSet) Builds a RemoveCommandorg.infinispan.commands.write.RemoveCommand
buildRemoveCommand
(Object key, Object value, int segment, long flagsBitSet, boolean returnEntry) 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 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) default org.infinispan.commands.write.ReplaceCommand
buildReplaceCommand
(Object key, Object oldValue, Object newValue, int segment, Metadata metadata, long flagsBitSet) Builds a ReplaceCommandorg.infinispan.commands.write.ReplaceCommand
buildReplaceCommand
(Object key, Object oldValue, Object newValue, int segment, Metadata metadata, long flagsBitSet, boolean returnEntry) Builds a ReplaceCommandorg.infinispan.commands.remote.RevokeBiasCommand
buildRevokeBiasCommand
(Address ackTarget, long id, int topologyId, Collection<Object> keys) org.infinispan.commands.tx.RollbackCommand
Builds a RollbackCommandorg.infinispan.commands.statetransfer.ScatteredStateConfirmRevokedCommand
buildScatteredStateConfirmRevokeCommand
(int topologyId, IntSet segments) org.infinispan.commands.statetransfer.ScatteredStateGetKeysCommand
buildScatteredStateGetKeysCommand
(int topologyId, IntSet segments) org.infinispan.commands.triangle.SingleKeyBackupWriteCommand
org.infinispan.commands.triangle.SingleKeyFunctionalBackupWriteCommand
default org.infinispan.commands.remote.SingleRpcCommand
Deprecated, for removal: This API element is subject to removal in a future version.org.infinispan.commands.remote.SingleRpcCommand
buildSingleRpcCommand
(VisitableCommand command) Builds a SingleRpcCommand "envelope" containing a single ReplicableCommandorg.infinispan.xsite.SingleXSiteRpcCommand
Builds SingleRpcCommand used to performVisitableCommand
on the backup site,org.infinispan.commands.read.SizeCommand
buildSizeCommand
(IntSet segments, long flagsBitSet) Builds a SizeCommandorg.infinispan.commands.statetransfer.StateResponseCommand
buildStateResponseCommand
(int viewId, Collection<org.infinispan.statetransfer.StateChunk> stateChunks, boolean applyState, boolean pushTransfer) Builds a StateResponseCommand used for pushing cache entries to another node.org.infinispan.commands.statetransfer.StateTransferCancelCommand
buildStateTransferCancelCommand
(int topologyId, IntSet segments) org.infinispan.commands.statetransfer.StateTransferGetListenersCommand
buildStateTransferGetListenersCommand
(int topologyId) org.infinispan.commands.statetransfer.StateTransferGetTransactionsCommand
buildStateTransferGetTransactionsCommand
(int topologyId, IntSet segments) org.infinispan.commands.statetransfer.StateTransferStartCommand
buildStateTransferStartCommand
(int topologyId, IntSet segments) buildTouchCommand
(Object key, int segment, boolean touchEvenIfExpired, long flagBitSet) org.infinispan.commands.remote.recovery.TxCompletionNotificationCommand
buildTxCompletionNotificationCommand
(long internalId) org.infinispan.commands.remote.recovery.TxCompletionNotificationCommand
buildTxCompletionNotificationCommand
(XidImpl xid, GlobalTransaction globalTransaction) Builds aTxCompletionNotificationCommand
.<K,
V, R> org.infinispan.commands.functional.TxReadOnlyKeyCommand <K, V, R> buildTxReadOnlyKeyCommand
(Object key, Function<EntryView.ReadEntryView<K, V>, R> f, List<org.infinispan.commands.functional.Mutation<K, V, ?>> mutations, int segment, Params params, DataConversion keyDataConversion, DataConversion valueDataConversion) <K,
V, R> org.infinispan.commands.functional.TxReadOnlyManyCommand <K, V, R> buildTxReadOnlyManyCommand
(Collection<?> keys, List<List<org.infinispan.commands.functional.Mutation<K, V, ?>>> mutations, Params params, DataConversion keyDataConversion, DataConversion valueDataConversion) org.infinispan.commands.tx.VersionedCommitCommand
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) buildXSiteAmendOfflineStatusCommand
(String siteName, Integer afterFailures, Long minTimeToWait) buildXSiteBringOnlineCommand
(String siteName) buildXSiteOfflineStatusCommand
(String siteName) buildXSiteStatePushCommand
(XSiteState[] chunk) Builds XSiteStatePushCommand used to transfer a single chunk of data between sites.buildXSiteStatePushRequest
(XSiteState[] chunk, long timeoutMillis) buildXSiteStateTransferControlRequest
(boolean startReceiving) buildXSiteStateTransferFinishSendCommand
(String siteName, boolean statusOk) buildXSiteStateTransferRestartSendingCommand
(String siteName, int topologyId) buildXSiteStateTransferStartSendCommand
(String siteName, int topologyId) buildXSiteTakeOfflineCommand
(String siteName) Retrieves the cache name this CommandFactory is set up to construct commands for.void
initializeReplicableCommand
(ReplicableCommand command, boolean isRemote) Deprecated, for removal: This API element is subject to removal in a future version.since 11.0, please useCacheRpcCommand.invokeAsync(ComponentRegistry)
orGlobalRpcCommand.invokeAsync(GlobalComponentRegistry)
instead.
-
Method Details
-
buildPutKeyValueCommand
default 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
-
buildPutKeyValueCommand
-
buildRemoveCommand
default 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
-
buildRemoveCommand
-
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) - See Also:
-
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
default 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
-
buildReplaceCommand
org.infinispan.commands.write.ReplaceCommand buildReplaceCommand(Object key, Object oldValue, Object newValue, int segment, Metadata metadata, long flagsBitSet, boolean returnEntry) 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 cachereturnEntry
- true if theCacheEntry
is the command response, otherwise returns previous value.- 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
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
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
Builds a RollbackCommand- Parameters:
gtx
- global transaction associated with the rollback- Returns:
- a RollbackCommand
-
initializeReplicableCommand
@Deprecated(forRemoval=true) void initializeReplicableCommand(ReplicableCommand command, boolean isRemote) Deprecated, for removal: This API element is subject to removal in a future version.since 11.0, please useCacheRpcCommand.invokeAsync(ComponentRegistry)
orGlobalRpcCommand.invokeAsync(GlobalComponentRegistry)
instead. to access any components required at invocation time.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
@Deprecated(forRemoval=true) default org.infinispan.commands.remote.SingleRpcCommand buildSingleRpcCommand(ReplicableCommand call) Deprecated, for removal: This API element is subject to removal in a future version.since 11.0 usebuildSingleRpcCommand(VisitableCommand)
instead.Builds a SingleRpcCommand "envelope" containing a single ReplicableCommand- Parameters:
call
- ReplicableCommand to include in the envelope- Returns:
- a SingleRpcCommand
-
buildSingleRpcCommand
Builds a SingleRpcCommand "envelope" containing a single ReplicableCommand- Parameters:
command
- VisitableCommand to include in the envelope- Returns:
- a SingleRpcCommand
-
buildClusteredGetCommand
org.infinispan.commands.remote.ClusteredGetCommand buildClusteredGetCommand(Object key, Integer segment, long flagsBitSet) Builds a ClusteredGetCommand, which is a remote lookup command- Parameters:
key
- key to look upsegment
- the segment for the key or null if it should be computed on the remote nodeflagsBitSet
- 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(Collection, long, GlobalTransaction)
but for locking a single key vs a collection of keys. -
buildLockControlCommand
org.infinispan.commands.control.LockControlCommand buildLockControlCommand(Collection<?> keys, long flagsBitSet) -
buildConflictResolutionStartCommand
org.infinispan.commands.statetransfer.ConflictResolutionStartCommand buildConflictResolutionStartCommand(int topologyId, IntSet segments) -
buildStateTransferCancelCommand
org.infinispan.commands.statetransfer.StateTransferCancelCommand buildStateTransferCancelCommand(int topologyId, IntSet segments) -
buildStateTransferGetListenersCommand
org.infinispan.commands.statetransfer.StateTransferGetListenersCommand buildStateTransferGetListenersCommand(int topologyId) -
buildStateTransferGetTransactionsCommand
org.infinispan.commands.statetransfer.StateTransferGetTransactionsCommand buildStateTransferGetTransactionsCommand(int topologyId, IntSet segments) -
buildStateTransferStartCommand
org.infinispan.commands.statetransfer.StateTransferStartCommand buildStateTransferStartCommand(int topologyId, IntSet segments) -
buildScatteredStateGetKeysCommand
org.infinispan.commands.statetransfer.ScatteredStateGetKeysCommand buildScatteredStateGetKeysCommand(int topologyId, IntSet segments) -
buildScatteredStateConfirmRevokeCommand
org.infinispan.commands.statetransfer.ScatteredStateConfirmRevokedCommand buildScatteredStateConfirmRevokeCommand(int topologyId, IntSet segments) -
buildStateResponseCommand
org.infinispan.commands.statetransfer.StateResponseCommand buildStateResponseCommand(int viewId, Collection<org.infinispan.statetransfer.StateChunk> stateChunks, boolean applyState, boolean pushTransfer) Builds a StateResponseCommand used for pushing cache entries to another node. -
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(XidImpl xid, GlobalTransaction globalTransaction) Builds aTxCompletionNotificationCommand
. -
buildGetInDoubtTxInfoCommand
org.infinispan.commands.remote.recovery.GetInDoubtTxInfoCommand buildGetInDoubtTxInfoCommand()- See Also:
-
buildCompleteTransactionCommand
org.infinispan.commands.remote.recovery.CompleteTransactionCommand buildCompleteTransactionCommand(XidImpl 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:
-
buildXSiteStateTransferCancelSendCommand
-
buildXSiteStateTransferClearStatusCommand
XSiteStateTransferClearStatusCommand buildXSiteStateTransferClearStatusCommand() -
buildXSiteStateTransferFinishReceiveCommand
-
buildXSiteStateTransferFinishSendCommand
XSiteStateTransferFinishSendCommand buildXSiteStateTransferFinishSendCommand(String siteName, boolean statusOk) -
buildXSiteStateTransferRestartSendingCommand
XSiteStateTransferRestartSendingCommand buildXSiteStateTransferRestartSendingCommand(String siteName, int topologyId) -
buildXSiteStateTransferStartReceiveCommand
-
buildXSiteStateTransferStartSendCommand
XSiteStateTransferStartSendCommand buildXSiteStateTransferStartSendCommand(String siteName, int topologyId) -
buildXSiteStateTransferStatusRequestCommand
XSiteStateTransferStatusRequestCommand buildXSiteStateTransferStatusRequestCommand() -
buildXSiteStateTransferControlRequest
-
buildXSiteAmendOfflineStatusCommand
XSiteAmendOfflineStatusCommand buildXSiteAmendOfflineStatusCommand(String siteName, Integer afterFailures, Long minTimeToWait) -
buildXSiteBringOnlineCommand
-
buildXSiteOfflineStatusCommand
-
buildXSiteStatusCommand
XSiteStatusCommand buildXSiteStatusCommand() -
buildXSiteTakeOfflineCommand
-
buildXSiteStatePushCommand
Builds XSiteStatePushCommand used to transfer a single chunk of data between sites.- Parameters:
chunk
- the data chunk- Returns:
- the XSiteStatePushCommand created
-
buildSingleXSiteRpcCommand
Builds SingleRpcCommand used to performVisitableCommand
on the backup site,- Parameters:
command
- the visitable command.- Returns:
- the SingleXSiteRpcCommand created
-
buildReadOnlyKeyCommand
<K,V, org.infinispan.commands.functional.ReadOnlyKeyCommand<K,R> V, buildReadOnlyKeyCommandR> (Object key, Function<EntryView.ReadEntryView<K, V>, R> f, int segment, Params params, DataConversion keyDataConversion, DataConversion valueDataConversion) -
buildReadOnlyManyCommand
<K,V, org.infinispan.commands.functional.ReadOnlyManyCommand<K,R> V, buildReadOnlyManyCommandR> (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, org.infinispan.commands.functional.ReadWriteKeyValueCommand<K,T, R> V, buildReadWriteKeyValueCommandT, R> (Object key, Object argument, BiFunction<T, EntryView.ReadWriteEntryView<K, V>, R> f, int segment, Params params, DataConversion keyDataConversion, DataConversion valueDataConversion) -
buildReadWriteKeyCommand
<K,V, org.infinispan.commands.functional.ReadWriteKeyCommand<K,R> V, buildReadWriteKeyCommandR> (Object key, Function<EntryView.ReadWriteEntryView<K, V>, R> f, int segment, Params params, DataConversion keyDataConversion, DataConversion valueDataConversion) -
buildWriteOnlyManyEntriesCommand
<K,V, org.infinispan.commands.functional.WriteOnlyManyEntriesCommand<K,T> V, buildWriteOnlyManyEntriesCommandT> (Map<?, ?> arguments, BiConsumer<T, EntryView.WriteEntryView<K, V>> f, Params params, DataConversion keyDataConversion, DataConversion valueDataConversion) -
buildWriteOnlyKeyValueCommand
<K,V, org.infinispan.commands.functional.WriteOnlyKeyValueCommand<K,T> V, buildWriteOnlyKeyValueCommandT> (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, org.infinispan.commands.functional.ReadWriteManyCommand<K,R> V, buildReadWriteManyCommandR> (Collection<?> keys, Function<EntryView.ReadWriteEntryView<K, V>, R> f, Params params, DataConversion keyDataConversion, DataConversion valueDataConversion) -
buildReadWriteManyEntriesCommand
<K,V, org.infinispan.commands.functional.ReadWriteManyEntriesCommand<K,T, R> V, buildReadWriteManyEntriesCommandT, R> (Map<?, ?> entries, BiFunction<T, EntryView.ReadWriteEntryView<K, V>, R> f, Params params, DataConversion keyDataConversion, DataConversion valueDataConversion) -
buildTxReadOnlyKeyCommand
<K,V, org.infinispan.commands.functional.TxReadOnlyKeyCommand<K,R> V, buildTxReadOnlyKeyCommandR> (Object key, Function<EntryView.ReadEntryView<K, V>, R> f, List<org.infinispan.commands.functional.Mutation<K, V, ?>> mutations, int segment, Params params, DataConversion keyDataConversion, DataConversion valueDataConversion) -
buildTxReadOnlyManyCommand
<K,V, org.infinispan.commands.functional.TxReadOnlyManyCommand<K,R> V, buildTxReadOnlyManyCommandR> (Collection<?> keys, List<List<org.infinispan.commands.functional.Mutation<K, V, ?>>> mutations, 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
-
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() -
buildBackupNoopCommand
org.infinispan.commands.triangle.BackupNoopCommand buildBackupNoopCommand() -
buildKeyReductionPublisherCommand
<K,R> org.infinispan.reactive.publisher.impl.commands.reduction.ReductionPublisherRequestCommand<K> buildKeyReductionPublisherCommand(boolean parallelStream, DeliveryGuarantee deliveryGuarantee, IntSet segments, Set<K> keys, Set<K> excludedKeys, long explicitFlags, Function<? super org.reactivestreams.Publisher<K>, ? extends CompletionStage<R>> transformer, Function<? super org.reactivestreams.Publisher<R>, ? extends CompletionStage<R>> finalizer) -
buildEntryReductionPublisherCommand
<K,V, org.infinispan.reactive.publisher.impl.commands.reduction.ReductionPublisherRequestCommand<K> buildEntryReductionPublisherCommandR> (boolean parallelStream, DeliveryGuarantee deliveryGuarantee, IntSet segments, Set<K> keys, Set<K> excludedKeys, long explicitFlags, Function<? super org.reactivestreams.Publisher<CacheEntry<K, V>>, ? extends CompletionStage<R>> transformer, Function<? super org.reactivestreams.Publisher<R>, ? extends CompletionStage<R>> finalizer) -
buildInitialPublisherCommand
<K,I, org.infinispan.reactive.publisher.impl.commands.batch.InitialPublisherCommand<K,R> I, buildInitialPublisherCommandR> (String requestId, DeliveryGuarantee deliveryGuarantee, int batchSize, IntSet segments, Set<K> keys, Set<K> excludedKeys, long explicitFlags, boolean entryStream, boolean trackKeys, Function<? super org.reactivestreams.Publisher<I>, ? extends org.reactivestreams.Publisher<R>> transformer) -
buildNextPublisherCommand
org.infinispan.reactive.publisher.impl.commands.batch.NextPublisherCommand buildNextPublisherCommand(String requestId) -
buildCancelPublisherCommand
org.infinispan.reactive.publisher.impl.commands.batch.CancelPublisherCommand buildCancelPublisherCommand(String requestId) -
buildMultiClusterEventCommand
<K,V> MultiClusterEventCommand<K,V> buildMultiClusterEventCommand(Map<UUID, Collection<ClusterEvent<K, V>>> events) -
buildCheckTransactionRpcCommand
org.infinispan.commands.remote.CheckTransactionRpcCommand buildCheckTransactionRpcCommand(Collection<GlobalTransaction> globalTransactions) -
buildTouchCommand
TouchCommand buildTouchCommand(Object key, int segment, boolean touchEvenIfExpired, long flagBitSet) -
buildIracClearKeysCommand
IracClearKeysRequest buildIracClearKeysCommand() -
buildIracCleanupKeyCommand
org.infinispan.commands.irac.IracCleanupKeysCommand buildIracCleanupKeyCommand(Collection<? extends IracManagerKeyInfo> state) -
buildIracTombstoneCleanupCommand
org.infinispan.commands.irac.IracTombstoneCleanupCommand buildIracTombstoneCleanupCommand(int maxCapacity) -
buildIracMetadataRequestCommand
org.infinispan.commands.irac.IracMetadataRequestCommand buildIracMetadataRequestCommand(int segment, IracEntryVersion versionSeen) -
buildIracRequestStateCommand
-
buildIracStateResponseCommand
org.infinispan.commands.irac.IracStateResponseCommand buildIracStateResponseCommand(int capacity) -
buildIracPutKeyValueCommand
org.infinispan.commands.write.IracPutKeyValueCommand buildIracPutKeyValueCommand(Object key, int segment, Object value, Metadata metadata, PrivateMetadata privateMetadata) -
buildIracTouchCommand
-
buildIracUpdateVersionCommand
org.infinispan.commands.irac.IracUpdateVersionCommand buildIracUpdateVersionCommand(Map<Integer, IracEntryVersion> segmentsVersion) -
buildXSiteAutoTransferStatusCommand
-
buildXSiteSetStateTransferModeCommand
XSiteSetStateTransferModeCommand buildXSiteSetStateTransferModeCommand(String site, XSiteStateTransferMode mode) -
buildIracTombstoneRemoteSiteCheckCommand
-
buildIracTombstoneStateResponseCommand
org.infinispan.commands.irac.IracTombstoneStateResponseCommand buildIracTombstoneStateResponseCommand(Collection<IracTombstoneInfo> state) -
buildIracTombstonePrimaryCheckCommand
org.infinispan.commands.irac.IracTombstonePrimaryCheckCommand buildIracTombstonePrimaryCheckCommand(Collection<IracTombstoneInfo> tombstones) -
buildIracPutManyCommand
-
buildXSiteStatePushRequest
-
buildIracTombstoneCheckRequest
-
buildSingleRpcCommand(VisitableCommand)
instead.