public class CommandsFactoryImpl extends Object implements CommandsFactory
| Constructor and Description |
|---|
CommandsFactoryImpl() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitbuildSingleRpcCommandpublic void start()
public PutKeyValueCommand buildPutKeyValueCommand(Object key, Object value, int segment, Metadata metadata, long flagsBitSet)
CommandsFactorybuildPutKeyValueCommand in interface CommandsFactorykey - key to putvalue - value to putsegment - the segment of the given keymetadata - metadata of entryflagsBitSet - Command flags provided by cachepublic RemoveCommand buildRemoveCommand(Object key, Object value, int segment, long flagsBitSet)
CommandsFactorybuildRemoveCommand in interface CommandsFactorykey - 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 cachepublic InvalidateCommand buildInvalidateCommand(long flagsBitSet, Object... keys)
CommandsFactorybuildInvalidateCommand in interface CommandsFactoryflagsBitSet - Command flags provided by cachekeys - keys to invalidatepublic InvalidateCommand buildInvalidateFromL1Command(long flagsBitSet, Collection<Object> keys)
CommandsFactorybuildInvalidateFromL1Command in interface CommandsFactoryflagsBitSet - Command flags provided by cachekeys - keys to invalidatepublic InvalidateCommand buildInvalidateFromL1Command(Address origin, long flagsBitSet, Collection<Object> keys)
buildInvalidateFromL1Command in interface CommandsFactoryCommandsFactory.buildInvalidateFromL1Command(long, Collection)public RemoveExpiredCommand buildRemoveExpiredCommand(Object key, Object value, int segment, Long lifespan, long flagsBitSet)
CommandsFactorybuildRemoveExpiredCommand in interface CommandsFactorykey - 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 cachepublic RemoveExpiredCommand buildRemoveExpiredCommand(Object key, Object value, int segment, long flagsBitSet)
CommandsFactorybuildRemoveExpiredCommand in interface CommandsFactorykey - 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 cachepublic ReplaceCommand buildReplaceCommand(Object key, Object oldValue, Object newValue, int segment, Metadata metadata, long flagsBitSet)
CommandsFactorybuildReplaceCommand in interface CommandsFactorykey - 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 cachepublic ComputeCommand buildComputeCommand(Object key, BiFunction mappingFunction, boolean computeIfPresent, int segment, Metadata metadata, long flagsBitSet)
CommandsFactorybuildComputeCommand in interface CommandsFactorykey - 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 cachepublic ComputeIfAbsentCommand buildComputeIfAbsentCommand(Object key, Function mappingFunction, int segment, Metadata metadata, long flagsBitSet)
CommandsFactorybuildComputeIfAbsentCommand in interface CommandsFactorykey - 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 cachepublic SizeCommand buildSizeCommand(long flagsBitSet)
CommandsFactorybuildSizeCommand in interface CommandsFactoryflagsBitSet - Command flags provided by cachepublic KeySetCommand buildKeySetCommand(long flagsBitSet)
CommandsFactorybuildKeySetCommand in interface CommandsFactoryflagsBitSet - Command flags provided by cachepublic EntrySetCommand buildEntrySetCommand(long flagsBitSet)
CommandsFactorybuildEntrySetCommand in interface CommandsFactoryflagsBitSet - Command flags provided by cachepublic GetKeyValueCommand buildGetKeyValueCommand(Object key, int segment, long flagsBitSet)
CommandsFactorybuildGetKeyValueCommand in interface CommandsFactorykey - key to getsegment - the segment of the given keyflagsBitSet - Command flags provided by cachepublic GetAllCommand buildGetAllCommand(Collection<?> keys, long flagsBitSet, boolean returnEntries)
CommandsFactorybuildGetAllCommand in interface CommandsFactorykeys - keys to getflagsBitSet - Command flags provided by cachereturnEntries - boolean indicating whether entire cache entries are
returned, otherwise return just the value partspublic PutMapCommand buildPutMapCommand(Map<?,?> map, Metadata metadata, long flagsBitSet)
CommandsFactorybuildPutMapCommand in interface CommandsFactorymap - map containing key/value entries to putmetadata - metadata of entryflagsBitSet - Command flags provided by cachepublic ClearCommand buildClearCommand(long flagsBitSet)
CommandsFactorybuildClearCommand in interface CommandsFactoryflagsBitSet - Command flags provided by cachepublic EvictCommand buildEvictCommand(Object key, int segment, long flagsBitSet)
CommandsFactorybuildEvictCommand in interface CommandsFactorykey - key to evictsegment - the segment for the keyflagsBitSet - Command flags provided by cachepublic PrepareCommand buildPrepareCommand(GlobalTransaction gtx, List<WriteCommand> modifications, boolean onePhaseCommit)
CommandsFactorybuildPrepareCommand in interface CommandsFactorygtx - global transaction associated with the preparemodifications - list of modificationsonePhaseCommit - is this a one-phase or two-phase transaction?public VersionedPrepareCommand buildVersionedPrepareCommand(GlobalTransaction gtx, List<WriteCommand> modifications, boolean onePhase)
CommandsFactorybuildVersionedPrepareCommand in interface CommandsFactorygtx - global transaction associated with the preparemodifications - list of modificationspublic CommitCommand buildCommitCommand(GlobalTransaction gtx)
CommandsFactorybuildCommitCommand in interface CommandsFactorygtx - global transaction associated with the commitpublic VersionedCommitCommand buildVersionedCommitCommand(GlobalTransaction gtx)
CommandsFactorybuildVersionedCommitCommand in interface CommandsFactorygtx - global transaction associated with the commitpublic RollbackCommand buildRollbackCommand(GlobalTransaction gtx)
CommandsFactorybuildRollbackCommand in interface CommandsFactorygtx - global transaction associated with the rollbackpublic SingleRpcCommand buildSingleRpcCommand(VisitableCommand call)
CommandsFactorybuildSingleRpcCommand in interface CommandsFactorycall - VisitableCommand to include in the envelopepublic ClusteredGetCommand buildClusteredGetCommand(Object key, int segment, long flagsBitSet)
CommandsFactorybuildClusteredGetCommand in interface CommandsFactorykey - key to look upsegment - the segment for the keyflagsBitSet - Command flags provided by cachepublic void initializeReplicableCommand(ReplicableCommand c, boolean isRemote)
CommandsFactoryReplicableCommand 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.
initializeReplicableCommand in interface CommandsFactoryisRemote - true if the command is deserialized and is executed remote.c - command to initialize. Cannot be null.public LockControlCommand buildLockControlCommand(Collection<?> keys, long flagsBitSet, GlobalTransaction gtx)
CommandsFactorybuildLockControlCommand in interface CommandsFactorykeys - keys to lockflagsBitSet - Command flags provided by cachepublic LockControlCommand buildLockControlCommand(Object key, long flagsBitSet, GlobalTransaction gtx)
CommandsFactoryCommandsFactory.buildLockControlCommand(Object, long, GlobalTransaction)
but for locking a single key vs a collection of keys.buildLockControlCommand in interface CommandsFactorypublic LockControlCommand buildLockControlCommand(Collection<?> keys, long flagsBitSet)
buildLockControlCommand in interface CommandsFactorypublic ConflictResolutionStartCommand buildConflictResolutionStartCommand(int topologyId, IntSet segments)
buildConflictResolutionStartCommand in interface CommandsFactorypublic ScatteredStateConfirmRevokedCommand buildScatteredStateConfirmRevokeCommand(int topologyId, IntSet segments)
buildScatteredStateConfirmRevokeCommand in interface CommandsFactorypublic ScatteredStateGetKeysCommand buildScatteredStateGetKeysCommand(int topologyId, IntSet segments)
buildScatteredStateGetKeysCommand in interface CommandsFactorypublic StateTransferCancelCommand buildStateTransferCancelCommand(int topologyId, IntSet segments)
buildStateTransferCancelCommand in interface CommandsFactorypublic StateTransferGetListenersCommand buildStateTransferGetListenersCommand(int topologyId)
buildStateTransferGetListenersCommand in interface CommandsFactorypublic StateTransferGetTransactionsCommand buildStateTransferGetTransactionsCommand(int topologyId, IntSet segments)
buildStateTransferGetTransactionsCommand in interface CommandsFactorypublic StateTransferStartCommand buildStateTransferStartCommand(int topologyId, IntSet segments)
buildStateTransferStartCommand in interface CommandsFactorypublic StateResponseCommand buildStateResponseCommand(int topologyId, Collection<StateChunk> stateChunks, boolean applyState, boolean pushTransfer)
CommandsFactorybuildStateResponseCommand in interface CommandsFactorypublic String getCacheName()
CommandsFactorygetCacheName in interface CommandsFactorypublic GetInDoubtTransactionsCommand buildGetInDoubtTransactionsCommand()
CommandsFactoryGetInDoubtTransactionsCommand.buildGetInDoubtTransactionsCommand in interface CommandsFactorypublic TxCompletionNotificationCommand buildTxCompletionNotificationCommand(XidImpl xid, GlobalTransaction globalTransaction)
CommandsFactoryTxCompletionNotificationCommand.buildTxCompletionNotificationCommand in interface CommandsFactorypublic TxCompletionNotificationCommand buildTxCompletionNotificationCommand(long internalId)
buildTxCompletionNotificationCommand in interface CommandsFactoryinternalId - the internal id identifying the transaction to be removed.TxCompletionNotificationCommandpublic GetInDoubtTxInfoCommand buildGetInDoubtTxInfoCommand()
buildGetInDoubtTxInfoCommand in interface CommandsFactoryGetInDoubtTxInfoCommandpublic CompleteTransactionCommand buildCompleteTransactionCommand(XidImpl xid, boolean commit)
CommandsFactorybuildCompleteTransactionCommand in interface CommandsFactoryxid - the xid identifying the transaction we want to complete.commit - commit(true) or rollback(false)?public XSiteStateTransferCancelSendCommand buildXSiteStateTransferCancelSendCommand(String siteName)
buildXSiteStateTransferCancelSendCommand in interface CommandsFactorypublic XSiteStateTransferClearStatusCommand buildXSiteStateTransferClearStatusCommand()
buildXSiteStateTransferClearStatusCommand in interface CommandsFactorypublic XSiteStateTransferFinishReceiveCommand buildXSiteStateTransferFinishReceiveCommand(String siteName)
buildXSiteStateTransferFinishReceiveCommand in interface CommandsFactorypublic XSiteStateTransferFinishSendCommand buildXSiteStateTransferFinishSendCommand(String siteName, boolean statusOk)
buildXSiteStateTransferFinishSendCommand in interface CommandsFactorypublic XSiteStateTransferRestartSendingCommand buildXSiteStateTransferRestartSendingCommand(String siteName, int topologyId)
buildXSiteStateTransferRestartSendingCommand in interface CommandsFactorypublic XSiteStateTransferStartReceiveCommand buildXSiteStateTransferStartReceiveCommand(String siteName)
buildXSiteStateTransferStartReceiveCommand in interface CommandsFactorypublic XSiteStateTransferStartSendCommand buildXSiteStateTransferStartSendCommand(String siteName, int topologyId)
buildXSiteStateTransferStartSendCommand in interface CommandsFactorypublic XSiteStateTransferStatusRequestCommand buildXSiteStateTransferStatusRequestCommand()
buildXSiteStateTransferStatusRequestCommand in interface CommandsFactorypublic XSiteAmendOfflineStatusCommand buildXSiteAmendOfflineStatusCommand(String siteName, Integer afterFailures, Long minTimeToWait)
buildXSiteAmendOfflineStatusCommand in interface CommandsFactorypublic XSiteBringOnlineCommand buildXSiteBringOnlineCommand(String siteName)
buildXSiteBringOnlineCommand in interface CommandsFactorypublic XSiteOfflineStatusCommand buildXSiteOfflineStatusCommand(String siteName)
buildXSiteOfflineStatusCommand in interface CommandsFactorypublic XSiteStatusCommand buildXSiteStatusCommand()
buildXSiteStatusCommand in interface CommandsFactorypublic XSiteTakeOfflineCommand buildXSiteTakeOfflineCommand(String siteName)
buildXSiteTakeOfflineCommand in interface CommandsFactorypublic XSiteStatePushCommand buildXSiteStatePushCommand(XSiteState[] chunk, long timeoutMillis)
CommandsFactorybuildXSiteStatePushCommand in interface CommandsFactorychunk - the data chunktimeoutMillis - timeout in milliseconds, for the retries in the receiver site.public SingleXSiteRpcCommand buildSingleXSiteRpcCommand(VisitableCommand command)
CommandsFactoryVisitableCommand on the backup site,buildSingleXSiteRpcCommand in interface CommandsFactorycommand - the visitable command.public GetKeysInGroupCommand buildGetKeysInGroupCommand(long flagsBitSet, Object groupName)
CommandsFactoryGetKeysInGroupCommand used to fetch all the keys belonging to a group.buildGetKeysInGroupCommand in interface CommandsFactoryflagsBitSet - Command flags provided by cachegroupName - the group name.public GetCacheEntryCommand buildGetCacheEntryCommand(Object key, int segment, long flagsBitSet)
CommandsFactorybuildGetCacheEntryCommand in interface CommandsFactorykey - key to getsegment - the segment for the keyflagsBitSet - Command flags provided by cachepublic ClusteredGetAllCommand buildClusteredGetAllCommand(List<?> keys, long flagsBitSet, GlobalTransaction gtx)
CommandsFactorybuildClusteredGetAllCommand in interface CommandsFactorykeys - key to look upflagsBitSet - Command flags provided by cachepublic <K,V,R> ReadOnlyKeyCommand<K,V,R> buildReadOnlyKeyCommand(Object key, Function<EntryView.ReadEntryView<K,V>,R> f, int segment, Params params, DataConversion keyDataConversion, DataConversion valueDataConversion)
buildReadOnlyKeyCommand in interface CommandsFactorypublic <K,V,R> ReadOnlyManyCommand<K,V,R> buildReadOnlyManyCommand(Collection<?> keys, Function<EntryView.ReadEntryView<K,V>,R> f, Params params, DataConversion keyDataConversion, DataConversion valueDataConversion)
buildReadOnlyManyCommand in interface CommandsFactorypublic <K,V,T,R> 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)
buildReadWriteKeyValueCommand in interface CommandsFactorypublic <K,V,R> ReadWriteKeyCommand<K,V,R> buildReadWriteKeyCommand(Object key, Function<EntryView.ReadWriteEntryView<K,V>,R> f, int segment, Params params, DataConversion keyDataConversion, DataConversion valueDataConversion)
buildReadWriteKeyCommand in interface CommandsFactorypublic <K,V,R> ReadWriteManyCommand<K,V,R> buildReadWriteManyCommand(Collection<?> keys, Function<EntryView.ReadWriteEntryView<K,V>,R> f, Params params, DataConversion keyDataConversion, DataConversion valueDataConversion)
buildReadWriteManyCommand in interface CommandsFactorypublic <K,V,T,R> ReadWriteManyEntriesCommand<K,V,T,R> buildReadWriteManyEntriesCommand(Map<?,?> entries, BiFunction<T,EntryView.ReadWriteEntryView<K,V>,R> f, Params params, DataConversion keyDataConversion, DataConversion valueDataConversion)
buildReadWriteManyEntriesCommand in interface CommandsFactorypublic InvalidateVersionsCommand buildInvalidateVersionsCommand(int topologyId, Object[] keys, int[] topologyIds, long[] versions, boolean removed)
buildInvalidateVersionsCommand in interface CommandsFactorypublic <K,V> WriteOnlyKeyCommand<K,V> buildWriteOnlyKeyCommand(Object key, Consumer<EntryView.WriteEntryView<K,V>> f, int segment, Params params, DataConversion keyDataConversion, DataConversion valueDataConversion)
buildWriteOnlyKeyCommand in interface CommandsFactorypublic <K,V,T> WriteOnlyKeyValueCommand<K,V,T> buildWriteOnlyKeyValueCommand(Object key, Object argument, BiConsumer<T,EntryView.WriteEntryView<K,V>> f, int segment, Params params, DataConversion keyDataConversion, DataConversion valueDataConversion)
buildWriteOnlyKeyValueCommand in interface CommandsFactorypublic <K,V> WriteOnlyManyCommand<K,V> buildWriteOnlyManyCommand(Collection<?> keys, Consumer<EntryView.WriteEntryView<K,V>> f, Params params, DataConversion keyDataConversion, DataConversion valueDataConversion)
buildWriteOnlyManyCommand in interface CommandsFactorypublic <K,V,T> WriteOnlyManyEntriesCommand<K,V,T> buildWriteOnlyManyEntriesCommand(Map<?,?> arguments, BiConsumer<T,EntryView.WriteEntryView<K,V>> f, Params params, DataConversion keyDataConversion, DataConversion valueDataConversion)
buildWriteOnlyManyEntriesCommand in interface CommandsFactorypublic <K,V,R> TxReadOnlyKeyCommand<K,V,R> buildTxReadOnlyKeyCommand(Object key, Function<EntryView.ReadEntryView<K,V>,R> f, List<Mutation<K,V,?>> mutations, int segment, Params params, DataConversion keyDataConversion, DataConversion valueDataConversion)
buildTxReadOnlyKeyCommand in interface CommandsFactorypublic <K,V,R> TxReadOnlyManyCommand<K,V,R> buildTxReadOnlyManyCommand(Collection<?> keys, List<List<Mutation<K,V,?>>> mutations, Params params, DataConversion keyDataConversion, DataConversion valueDataConversion)
buildTxReadOnlyManyCommand in interface CommandsFactorypublic BackupAckCommand buildBackupAckCommand(long id, int topologyId)
buildBackupAckCommand in interface CommandsFactorypublic BackupMultiKeyAckCommand buildBackupMultiKeyAckCommand(long id, int segment, int topologyId)
buildBackupMultiKeyAckCommand in interface CommandsFactorypublic ExceptionAckCommand buildExceptionAckCommand(long id, Throwable throwable, int topologyId)
buildExceptionAckCommand in interface CommandsFactorypublic RevokeBiasCommand buildRevokeBiasCommand(Address ackTarget, long id, int topologyId, Collection<Object> keys)
buildRevokeBiasCommand in interface CommandsFactorypublic RenewBiasCommand buildRenewBiasCommand(Object[] keys)
buildRenewBiasCommand in interface CommandsFactorypublic SingleKeyBackupWriteCommand buildSingleKeyBackupWriteCommand()
buildSingleKeyBackupWriteCommand in interface CommandsFactorypublic SingleKeyFunctionalBackupWriteCommand buildSingleKeyFunctionalBackupWriteCommand()
buildSingleKeyFunctionalBackupWriteCommand in interface CommandsFactorypublic PutMapBackupWriteCommand buildPutMapBackupWriteCommand()
buildPutMapBackupWriteCommand in interface CommandsFactorypublic MultiEntriesFunctionalBackupWriteCommand buildMultiEntriesFunctionalBackupWriteCommand()
buildMultiEntriesFunctionalBackupWriteCommand in interface CommandsFactorypublic MultiKeyFunctionalBackupWriteCommand buildMultiKeyFunctionalBackupWriteCommand()
buildMultiKeyFunctionalBackupWriteCommand in interface CommandsFactorypublic <K,R> ReductionPublisherRequestCommand<K> buildKeyReductionPublisherCommand(boolean parallelStream, DeliveryGuarantee deliveryGuarantee, IntSet segments, Set<K> keys, Set<K> excludedKeys, boolean includeLoader, Function<? super org.reactivestreams.Publisher<K>,? extends CompletionStage<R>> transformer, Function<? super org.reactivestreams.Publisher<R>,? extends CompletionStage<R>> finalizer)
buildKeyReductionPublisherCommand in interface CommandsFactorypublic <K,V,R> ReductionPublisherRequestCommand<K> buildEntryReductionPublisherCommand(boolean parallelStream, DeliveryGuarantee deliveryGuarantee, IntSet segments, Set<K> keys, Set<K> excludedKeys, boolean includeLoader, Function<? super org.reactivestreams.Publisher<CacheEntry<K,V>>,? extends CompletionStage<R>> transformer, Function<? super org.reactivestreams.Publisher<R>,? extends CompletionStage<R>> finalizer)
buildEntryReductionPublisherCommand in interface CommandsFactorypublic <K,I,R> InitialPublisherCommand<K,I,R> buildInitialPublisherCommand(String requestId, DeliveryGuarantee deliveryGuarantee, int batchSize, IntSet segments, Set<K> keys, Set<K> excludedKeys, boolean includeLoader, boolean entryStream, boolean trackKeys, Function<? super org.reactivestreams.Publisher<I>,? extends org.reactivestreams.Publisher<R>> transformer)
buildInitialPublisherCommand in interface CommandsFactorypublic NextPublisherCommand buildNextPublisherCommand(String requestId)
buildNextPublisherCommand in interface CommandsFactorypublic CancelPublisherCommand buildCancelPublisherCommand(String requestId)
buildCancelPublisherCommand in interface CommandsFactorypublic <K,V> MultiClusterEventCommand<K,V> buildMultiClusterEventCommand(Map<UUID,Collection<ClusterEvent<K,V>>> events)
buildMultiClusterEventCommand in interface CommandsFactorypublic CheckTransactionRpcCommand buildCheckTransactionRpcCommand(Collection<GlobalTransaction> globalTransactions)
buildCheckTransactionRpcCommand in interface CommandsFactorypublic TouchCommand buildTouchCommand(Object key, int segment)
buildTouchCommand in interface CommandsFactorypublic <K,V> IracPutKeyCommand buildIracPutKeyCommand(InternalCacheEntry<K,V> entry)
buildIracPutKeyCommand in interface CommandsFactorypublic IracRemoveKeyCommand buildIracRemoveKeyCommand(Object key, IracMetadata iracMetadata)
buildIracRemoveKeyCommand in interface CommandsFactorypublic IracClearKeysCommand buildIracClearKeysCommand()
buildIracClearKeysCommand in interface CommandsFactorypublic IracCleanupKeyCommand buildIracCleanupKeyCommand(Object key, Object lockOwner, IracMetadata tombstone)
buildIracCleanupKeyCommand in interface CommandsFactorypublic IracMetadataRequestCommand buildIracMetadataRequestCommand(int segment)
buildIracMetadataRequestCommand in interface CommandsFactorypublic IracRequestStateCommand buildIracRequestStateCommand(IntSet segments)
buildIracRequestStateCommand in interface CommandsFactorypublic IracStateResponseCommand buildIracStateResponseCommand(Object key, Object lockOwner, IracMetadata tombstone)
buildIracStateResponseCommand in interface CommandsFactoryCopyright © 2022 JBoss by Red Hat. All rights reserved.