public class CommandsFactoryImpl extends Object implements CommandsFactory
Constructor and Description |
---|
CommandsFactoryImpl() |
Modifier and Type | Method and Description |
---|---|
ApplyDeltaCommand |
buildApplyDeltaCommand(Object deltaAwareValueKey,
Delta delta,
Collection keys)
Builds a ApplyDeltaCommand used for applying Delta objects to DeltaAware containers stored in cache
|
CancelCommand |
buildCancelCommandCommand(UUID commandUUID)
Builds CancelCommandCommand used to cancel other commands executing on Infinispan cluster
|
ClearCommand |
buildClearCommand(Set<Flag> flags)
Builds a ClearCommand
|
ClusteredGetAllCommand |
buildClusteredGetAllCommand(List<?> keys,
Set<Flag> flags,
GlobalTransaction gtx)
Builds a ClusteredGetAllCommand, which is a remote lookup command
|
ClusteredGetCommand |
buildClusteredGetCommand(Object key,
Set<Flag> flags,
boolean acquireRemoteLock,
GlobalTransaction gtx)
Builds a ClusteredGetCommand, which is a remote lookup command
|
CommitCommand |
buildCommitCommand(GlobalTransaction gtx)
Builds a CommitCommand
|
CompleteTransactionCommand |
buildCompleteTransactionCommand(Xid xid,
boolean commit)
Builds a CompleteTransactionCommand command.
|
CreateCacheCommand |
buildCreateCacheCommand(String cacheNameToCreate,
String cacheConfigurationName)
Same as
buildCreateCacheCommand(cacheName, cacheConfigurationName, false, 0) . |
CreateCacheCommand |
buildCreateCacheCommand(String cacheNameToCreate,
String cacheConfigurationName,
int size)
Builds a CreateCacheCommand used to create/start cache around Infinispan cluster
|
<T> DistributedExecuteCommand<T> |
buildDistributedExecuteCommand(Callable<T> callable,
Address sender,
Collection keys)
Builds a DistributedExecuteCommand used for migration and execution of distributed Callables and Runnables.
|
<K,V,C> EntryRequestCommand<K,V,C> |
buildEntryRequestCommand(UUID identifier,
Set<Integer> segments,
Set<K> keysToFilter,
KeyValueFilter<? super K,? super V> filter,
Converter<? super K,? super V,C> converter,
Set<Flag> flags)
Builds
EntryRequestCommand used to request entries from a remote node for
given segments |
<K,C> EntryResponseCommand<K,C> |
buildEntryResponseCommand(UUID identifier,
Set<Integer> completedSegments,
Set<Integer> inDoubtSegments,
Collection<CacheEntry<K,C>> values,
CacheException e)
Builds
EntryResponseCommand use to respond with retrieved entries for
given segments |
EntrySetCommand |
buildEntrySetCommand(Set<Flag> flags)
Builds a EntrySetCommand
|
EvictCommand |
buildEvictCommand(Object key,
Set<Flag> flags)
Builds an EvictCommand
|
GetAllCommand |
buildGetAllCommand(Collection<?> keys,
Set<Flag> flags,
boolean returnEntries)
Builds a GetAllCommand
|
GetCacheEntryCommand |
buildGetCacheEntryCommand(Object key,
Set<Flag> explicitFlags)
Builds a GetCacheEntryCommand
|
GetInDoubtTransactionsCommand |
buildGetInDoubtTransactionsCommand()
Builds a
GetInDoubtTransactionsCommand . |
GetInDoubtTxInfoCommand |
buildGetInDoubtTxInfoCommand() |
GetKeysInGroupCommand |
buildGetKeysInGroupCommand(Set<Flag> flags,
String groupName)
Builds
GetKeysInGroupCommand used to fetch all the keys belonging to a group. |
GetKeyValueCommand |
buildGetKeyValueCommand(Object key,
Set<Flag> flags)
Builds a GetKeyValueCommand
|
InvalidateCommand |
buildInvalidateCommand(Set<Flag> flags,
Object... keys)
Builds an InvalidateCommand
|
InvalidateCommand |
buildInvalidateFromL1Command(Address origin,
Set<Flag> flags,
Collection<Object> keys) |
InvalidateCommand |
buildInvalidateFromL1Command(Set<Flag> flags,
Collection<Object> keys)
Builds an InvalidateFromL1Command
|
KeySetCommand |
buildKeySetCommand(Set<Flag> flags)
Builds a KeySetCommand
|
LockControlCommand |
buildLockControlCommand(Collection<?> keys,
Set<Flag> flags) |
LockControlCommand |
buildLockControlCommand(Collection<?> keys,
Set<Flag> flags,
GlobalTransaction gtx)
Builds a LockControlCommand to control explicit remote locking
|
LockControlCommand |
buildLockControlCommand(Object key,
Set<Flag> flags,
GlobalTransaction gtx)
Same as
CommandsFactory.buildLockControlCommand(Object, java.util.Set, org.infinispan.transaction.xa.GlobalTransaction)
but for locking a single key vs a collection of keys. |
<KIn,VIn,KOut,VOut> |
buildMapCombineCommand(String taskId,
Mapper<KIn,VIn,KOut,VOut> m,
Reducer<KOut,VOut> r,
Collection<KIn> keys)
Builds a MapCombineCommand used for migration and map phase execution of MapReduce tasks.
|
PrepareCommand |
buildPrepareCommand(GlobalTransaction gtx,
List<WriteCommand> modifications,
boolean onePhaseCommit)
Builds a PrepareCommand
|
PutKeyValueCommand |
buildPutKeyValueCommand(Object key,
Object value,
Metadata metadata,
Set<Flag> flags)
Builds a PutKeyValueCommand
|
PutMapCommand |
buildPutMapCommand(Map<?,?> map,
Metadata metadata,
Set<Flag> flags)
Builds a PutMapCommand
|
<K,V,R> ReadOnlyKeyCommand<K,V,R> |
buildReadOnlyKeyCommand(K key,
Function<EntryView.ReadEntryView<K,V>,R> f) |
<K,V,R> ReadOnlyManyCommand<K,V,R> |
buildReadOnlyManyCommand(Set<? extends K> keys,
Function<EntryView.ReadEntryView<K,V>,R> f) |
<K,V,R> ReadWriteKeyCommand<K,V,R> |
buildReadWriteKeyCommand(K key,
Function<EntryView.ReadWriteEntryView<K,V>,R> f,
Params params) |
<K,V,R> ReadWriteKeyValueCommand<K,V,R> |
buildReadWriteKeyValueCommand(K key,
V value,
BiFunction<V,EntryView.ReadWriteEntryView<K,V>,R> f,
Params params) |
<K,V,R> ReadWriteManyCommand<K,V,R> |
buildReadWriteManyCommand(Set<? extends K> keys,
Function<EntryView.ReadWriteEntryView<K,V>,R> f,
Params params) |
<K,V,R> ReadWriteManyEntriesCommand<K,V,R> |
buildReadWriteManyEntriesCommand(Map<? extends K,? extends V> entries,
BiFunction<V,EntryView.ReadWriteEntryView<K,V>,R> f,
Params params) |
<KOut,VOut> |
buildReduceCommand(String taskId,
String destintationCache,
Reducer<KOut,VOut> r,
Collection<KOut> keys)
Builds a ReduceCommand used for migration and reduce phase execution of MapReduce tasks.
|
RemoveCommand |
buildRemoveCommand(Object key,
Object value,
Set<Flag> flags)
Builds a RemoveCommand
|
RemoveExpiredCommand |
buildRemoveExpiredCommand(Object key,
Object value,
Long lifespan)
Builds an expired remove command that is used to remove only a specific expired entry
|
ReplaceCommand |
buildReplaceCommand(Object key,
Object oldValue,
Object newValue,
Metadata metadata,
Set<Flag> flags)
Builds a ReplaceCommand
|
MultipleRpcCommand |
buildReplicateCommand(List<ReplicableCommand> toReplicate)
Builds an RpcCommand "envelope" containing multiple ReplicableCommands
|
RollbackCommand |
buildRollbackCommand(GlobalTransaction gtx)
Builds a RollbackCommand
|
SingleRpcCommand |
buildSingleRpcCommand(ReplicableCommand call)
Builds a SingleRpcCommand "envelope" containing a single ReplicableCommand
|
SingleXSiteRpcCommand |
buildSingleXSiteRpcCommand(VisitableCommand command)
Builds SingleRpcCommand used to perform
VisitableCommand on the backup site, |
SizeCommand |
buildSizeCommand(Set<Flag> flags)
Builds a SizeCommand
|
StateRequestCommand |
buildStateRequestCommand(StateRequestCommand.Type subtype,
Address sender,
int viewId,
Set<Integer> segments)
Builds a StateRequestCommand used for requesting transactions and locks and for starting or canceling transfer of cache entries.
|
StateResponseCommand |
buildStateResponseCommand(Address sender,
int topologyId,
Collection<StateChunk> stateChunks)
Builds a StateResponseCommand used for pushing cache entries to another node in response to a StateRequestCommand.
|
<K> StreamRequestCommand<K> |
buildStreamRequestCommand(Object id,
boolean parallelStream,
StreamRequestCommand.Type type,
Set<Integer> segments,
Set<K> keys,
Set<K> excludedKeys,
boolean includeLoader,
Object terminalOperation) |
<R> StreamResponseCommand<R> |
buildStreamResponseCommand(Object identifier,
boolean complete,
Set<Integer> lostSegments,
R response)
Builds
StreamResponseCommand used to send back a response either intermediate or complete to the
originating node with the information for the stream request. |
TxCompletionNotificationCommand |
buildTxCompletionNotificationCommand(long internalId) |
TxCompletionNotificationCommand |
buildTxCompletionNotificationCommand(Xid xid,
GlobalTransaction globalTransaction)
Builds a
TxCompletionNotificationCommand . |
VersionedCommitCommand |
buildVersionedCommitCommand(GlobalTransaction gtx)
Builds a VersionedCommitCommand
|
VersionedPrepareCommand |
buildVersionedPrepareCommand(GlobalTransaction gtx,
List<WriteCommand> modifications,
boolean onePhase)
Builds a VersionedPrepareCommand
|
<K,V> WriteOnlyKeyCommand<K,V> |
buildWriteOnlyKeyCommand(K key,
Consumer<EntryView.WriteEntryView<V>> f,
Params params) |
<K,V> WriteOnlyKeyValueCommand<K,V> |
buildWriteOnlyKeyValueCommand(K key,
V value,
BiConsumer<V,EntryView.WriteEntryView<V>> f,
Params params) |
<K,V> WriteOnlyManyCommand<K,V> |
buildWriteOnlyManyCommand(Set<? extends K> keys,
Consumer<EntryView.WriteEntryView<V>> f,
Params params) |
<K,V> WriteOnlyManyEntriesCommand<K,V> |
buildWriteOnlyManyEntriesCommand(Map<? extends K,? extends V> entries,
BiConsumer<V,EntryView.WriteEntryView<V>> f,
Params params) |
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 c,
boolean isRemote)
Initializes a
ReplicableCommand read from a data stream with components specific
to the target cache instance. |
void |
setupDependencies(DataContainer container,
CacheNotifier<Object,Object> notifier,
Cache<Object,Object> cache,
InterceptorChain interceptorChain,
DistributionManager distributionManager,
InvocationContextFactory icf,
TransactionTable txTable,
Configuration configuration,
Map<Byte,ModuleCommandInitializer> moduleCommandInitializers,
RecoveryManager recoveryManager,
StateProvider stateProvider,
StateConsumer stateConsumer,
LockManager lockManager,
InternalEntryFactory entryFactory,
MapReduceManager mapReduceManager,
StateTransferManager stm,
BackupSender backupSender,
CancellationService cancellationService,
TimeService timeService,
XSiteStateProvider xSiteStateProvider,
XSiteStateConsumer xSiteStateConsumer,
XSiteStateTransferManager xSiteStateTransferManager,
EntryRetriever entryRetriever,
GroupManager groupManager,
PartitionHandlingManager partitionHandlingManager,
LocalStreamManager localStreamManager,
ClusterStreamManager clusterStreamManager,
ClusteringDependentLogic clusteringDependentLogic,
ExternalizerTable externalizerTable) |
void |
start() |
public void setupDependencies(DataContainer container, CacheNotifier<Object,Object> notifier, Cache<Object,Object> cache, InterceptorChain interceptorChain, DistributionManager distributionManager, InvocationContextFactory icf, TransactionTable txTable, Configuration configuration, Map<Byte,ModuleCommandInitializer> moduleCommandInitializers, RecoveryManager recoveryManager, StateProvider stateProvider, StateConsumer stateConsumer, LockManager lockManager, InternalEntryFactory entryFactory, MapReduceManager mapReduceManager, StateTransferManager stm, BackupSender backupSender, CancellationService cancellationService, TimeService timeService, XSiteStateProvider xSiteStateProvider, XSiteStateConsumer xSiteStateConsumer, XSiteStateTransferManager xSiteStateTransferManager, EntryRetriever entryRetriever, GroupManager groupManager, PartitionHandlingManager partitionHandlingManager, LocalStreamManager localStreamManager, ClusterStreamManager clusterStreamManager, ClusteringDependentLogic clusteringDependentLogic, ExternalizerTable externalizerTable)
public void start()
public PutKeyValueCommand buildPutKeyValueCommand(Object key, Object value, Metadata metadata, Set<Flag> flags)
CommandsFactory
buildPutKeyValueCommand
in interface CommandsFactory
key
- key to putvalue
- value to putmetadata
- metadata of entryflags
- Command flags provided by cachepublic RemoveCommand buildRemoveCommand(Object key, Object value, Set<Flag> flags)
CommandsFactory
buildRemoveCommand
in interface CommandsFactory
key
- key to removevalue
- value to check for ina conditional remove, or null for an unconditional remove.flags
- Command flags provided by cachepublic InvalidateCommand buildInvalidateCommand(Set<Flag> flags, Object... keys)
CommandsFactory
buildInvalidateCommand
in interface CommandsFactory
flags
- Command flags provided by cachekeys
- keys to invalidatepublic InvalidateCommand buildInvalidateFromL1Command(Set<Flag> flags, Collection<Object> keys)
CommandsFactory
buildInvalidateFromL1Command
in interface CommandsFactory
keys
- keys to invalidatepublic InvalidateCommand buildInvalidateFromL1Command(Address origin, Set<Flag> flags, Collection<Object> keys)
buildInvalidateFromL1Command
in interface CommandsFactory
CommandsFactory.buildInvalidateFromL1Command(java.util.Set, java.util.Collection)
public RemoveExpiredCommand buildRemoveExpiredCommand(Object key, Object value, Long lifespan)
CommandsFactory
buildRemoveExpiredCommand
in interface CommandsFactory
key
- the key of the expired entryvalue
- the value of the entry when it was expiredlifespan
- the lifespan that expired from the commandpublic ReplaceCommand buildReplaceCommand(Object key, Object oldValue, Object newValue, Metadata metadata, Set<Flag> flags)
CommandsFactory
buildReplaceCommand
in interface CommandsFactory
key
- key to replaceoldValue
- existing value to check for if conditional, null if unconditional.newValue
- value to replace withmetadata
- metadata of entryflags
- Command flags provided by cachepublic SizeCommand buildSizeCommand(Set<Flag> flags)
CommandsFactory
buildSizeCommand
in interface CommandsFactory
flags
- Command flags provided by cachepublic KeySetCommand buildKeySetCommand(Set<Flag> flags)
CommandsFactory
buildKeySetCommand
in interface CommandsFactory
flags
- Command flags provided by cachepublic EntrySetCommand buildEntrySetCommand(Set<Flag> flags)
CommandsFactory
buildEntrySetCommand
in interface CommandsFactory
flags
- Command flags provided by cachepublic GetKeyValueCommand buildGetKeyValueCommand(Object key, Set<Flag> flags)
CommandsFactory
buildGetKeyValueCommand
in interface CommandsFactory
key
- key to getflags
- Command flags provided by cachepublic GetAllCommand buildGetAllCommand(Collection<?> keys, Set<Flag> flags, boolean returnEntries)
CommandsFactory
buildGetAllCommand
in interface CommandsFactory
keys
- keys to getflags
- 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, Set<Flag> flags)
CommandsFactory
buildPutMapCommand
in interface CommandsFactory
map
- map containing key/value entries to putmetadata
- metadata of entryflags
- Command flags provided by cachepublic ClearCommand buildClearCommand(Set<Flag> flags)
CommandsFactory
buildClearCommand
in interface CommandsFactory
flags
- Command flags provided by cachepublic EvictCommand buildEvictCommand(Object key, Set<Flag> flags)
CommandsFactory
buildEvictCommand
in interface CommandsFactory
key
- key to evictflags
- Command flags provided by cachepublic PrepareCommand buildPrepareCommand(GlobalTransaction gtx, List<WriteCommand> modifications, boolean onePhaseCommit)
CommandsFactory
buildPrepareCommand
in interface CommandsFactory
gtx
- 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)
CommandsFactory
buildVersionedPrepareCommand
in interface CommandsFactory
gtx
- global transaction associated with the preparemodifications
- list of modificationspublic CommitCommand buildCommitCommand(GlobalTransaction gtx)
CommandsFactory
buildCommitCommand
in interface CommandsFactory
gtx
- global transaction associated with the commitpublic VersionedCommitCommand buildVersionedCommitCommand(GlobalTransaction gtx)
CommandsFactory
buildVersionedCommitCommand
in interface CommandsFactory
gtx
- global transaction associated with the commitpublic RollbackCommand buildRollbackCommand(GlobalTransaction gtx)
CommandsFactory
buildRollbackCommand
in interface CommandsFactory
gtx
- global transaction associated with the rollbackpublic MultipleRpcCommand buildReplicateCommand(List<ReplicableCommand> toReplicate)
CommandsFactory
buildReplicateCommand
in interface CommandsFactory
toReplicate
- ReplicableCommands to include in the envelopepublic SingleRpcCommand buildSingleRpcCommand(ReplicableCommand call)
CommandsFactory
buildSingleRpcCommand
in interface CommandsFactory
call
- ReplicableCommand to include in the envelopepublic ClusteredGetCommand buildClusteredGetCommand(Object key, Set<Flag> flags, boolean acquireRemoteLock, GlobalTransaction gtx)
CommandsFactory
buildClusteredGetCommand
in interface CommandsFactory
key
- key to look uppublic void initializeReplicableCommand(ReplicableCommand c, boolean isRemote)
CommandsFactory
ReplicableCommand
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 CommandsFactory
isRemote
- true if the command is deserialized and is executed remote.c
- command to initialize. Cannot be null.public LockControlCommand buildLockControlCommand(Collection<?> keys, Set<Flag> flags, GlobalTransaction gtx)
CommandsFactory
buildLockControlCommand
in interface CommandsFactory
keys
- keys to lockpublic LockControlCommand buildLockControlCommand(Object key, Set<Flag> flags, GlobalTransaction gtx)
CommandsFactory
CommandsFactory.buildLockControlCommand(Object, java.util.Set, org.infinispan.transaction.xa.GlobalTransaction)
but for locking a single key vs a collection of keys.buildLockControlCommand
in interface CommandsFactory
public LockControlCommand buildLockControlCommand(Collection<?> keys, Set<Flag> flags)
buildLockControlCommand
in interface CommandsFactory
public StateRequestCommand buildStateRequestCommand(StateRequestCommand.Type subtype, Address sender, int viewId, Set<Integer> segments)
CommandsFactory
buildStateRequestCommand
in interface CommandsFactory
public StateResponseCommand buildStateResponseCommand(Address sender, int topologyId, Collection<StateChunk> stateChunks)
CommandsFactory
buildStateResponseCommand
in interface CommandsFactory
public String getCacheName()
CommandsFactory
getCacheName
in interface CommandsFactory
public GetInDoubtTransactionsCommand buildGetInDoubtTransactionsCommand()
CommandsFactory
GetInDoubtTransactionsCommand
.buildGetInDoubtTransactionsCommand
in interface CommandsFactory
public TxCompletionNotificationCommand buildTxCompletionNotificationCommand(Xid xid, GlobalTransaction globalTransaction)
CommandsFactory
TxCompletionNotificationCommand
.buildTxCompletionNotificationCommand
in interface CommandsFactory
public TxCompletionNotificationCommand buildTxCompletionNotificationCommand(long internalId)
buildTxCompletionNotificationCommand
in interface CommandsFactory
internalId
- the internal id identifying the transaction to be removed.TxCompletionNotificationCommand
public <T> DistributedExecuteCommand<T> buildDistributedExecuteCommand(Callable<T> callable, Address sender, Collection keys)
CommandsFactory
buildDistributedExecuteCommand
in interface CommandsFactory
callable
- the callable tasksender
- sender's Addresskeys
- keys used in Callablepublic <KIn,VIn,KOut,VOut> MapCombineCommand<KIn,VIn,KOut,VOut> buildMapCombineCommand(String taskId, Mapper<KIn,VIn,KOut,VOut> m, Reducer<KOut,VOut> r, Collection<KIn> keys)
CommandsFactory
buildMapCombineCommand
in interface CommandsFactory
m
- Mapper for MapReduceTaskr
- Combiner for MapReduceTaskkeys
- keys used in MapReduceTaskpublic GetInDoubtTxInfoCommand buildGetInDoubtTxInfoCommand()
buildGetInDoubtTxInfoCommand
in interface CommandsFactory
GetInDoubtTxInfoCommand
public CompleteTransactionCommand buildCompleteTransactionCommand(Xid xid, boolean commit)
CommandsFactory
buildCompleteTransactionCommand
in interface CommandsFactory
xid
- the xid identifying the transaction we want to complete.commit
- commit(true) or rollback(false)?public ApplyDeltaCommand buildApplyDeltaCommand(Object deltaAwareValueKey, Delta delta, Collection keys)
CommandsFactory
buildApplyDeltaCommand
in interface CommandsFactory
ApplyDeltaCommand
public CreateCacheCommand buildCreateCacheCommand(String cacheNameToCreate, String cacheConfigurationName)
CommandsFactory
buildCreateCacheCommand(cacheName, cacheConfigurationName, false, 0)
.buildCreateCacheCommand
in interface CommandsFactory
public CreateCacheCommand buildCreateCacheCommand(String cacheNameToCreate, String cacheConfigurationName, int size)
CommandsFactory
buildCreateCacheCommand
in interface CommandsFactory
size
- If size > 0
, the command will wait until the cache runs on at least size
nodes.public <KOut,VOut> ReduceCommand<KOut,VOut> buildReduceCommand(String taskId, String destintationCache, Reducer<KOut,VOut> r, Collection<KOut> keys)
CommandsFactory
buildReduceCommand
in interface CommandsFactory
r
- Reducer for MapReduceTaskkeys
- keys used in MapReduceTaskpublic CancelCommand buildCancelCommandCommand(UUID commandUUID)
CommandsFactory
buildCancelCommandCommand
in interface CommandsFactory
commandUUID
- UUID for command to cancelpublic XSiteStateTransferControlCommand buildXSiteStateTransferControlCommand(XSiteStateTransferControlCommand.StateTransferControl control, String siteName)
CommandsFactory
buildXSiteStateTransferControlCommand
in interface CommandsFactory
control
- the control operationsiteName
- the site name, needed for some control operations.public XSiteAdminCommand buildXSiteAdminCommand(String siteName, XSiteAdminCommand.AdminOperation op, Integer afterFailures, Long minTimeToWait)
CommandsFactory
buildXSiteAdminCommand
in interface CommandsFactory
public XSiteStatePushCommand buildXSiteStatePushCommand(XSiteState[] chunk, long timeoutMillis)
CommandsFactory
buildXSiteStatePushCommand
in interface CommandsFactory
chunk
- the data chunktimeoutMillis
- timeout in milliseconds, for the retries in the receiver site.public SingleXSiteRpcCommand buildSingleXSiteRpcCommand(VisitableCommand command)
CommandsFactory
VisitableCommand
on the backup site,buildSingleXSiteRpcCommand
in interface CommandsFactory
command
- the visitable command.public <K,V,C> EntryRequestCommand<K,V,C> buildEntryRequestCommand(UUID identifier, Set<Integer> segments, Set<K> keysToFilter, KeyValueFilter<? super K,? super V> filter, Converter<? super K,? super V,C> converter, Set<Flag> flags)
CommandsFactory
EntryRequestCommand
used to request entries from a remote node for
given segmentsbuildEntryRequestCommand
in interface CommandsFactory
K
- The key type of the stored keyV
- The value type of the stored valuesC
- The converted type after the value is applied from the converteridentifier
- The unique identifier for this entry retrieval requestsegments
- The segments this request should retrievefilter
- The filter to apply to any found values to limit response dataconverter
- The converter to apply to any found valuesflags
- The flags used to modify behaviorpublic <K,C> EntryResponseCommand<K,C> buildEntryResponseCommand(UUID identifier, Set<Integer> completedSegments, Set<Integer> inDoubtSegments, Collection<CacheEntry<K,C>> values, CacheException e)
CommandsFactory
EntryResponseCommand
use to respond with retrieved entries for
given segmentsbuildEntryResponseCommand
in interface CommandsFactory
K
- The key type of the stored keyC
- The converted type after the value is applied from the converteridentifier
- The unique identifier for this entry retrieval requestcompletedSegments
- The segments that are now completed per this responseinDoubtSegments
- The segements that are now in doubt meaning they must be retrieved again from another
node due to rehashvalues
- The entries retrieved from the remote nodee
- If an exception occurred while running the processing on the remote nodepublic GetKeysInGroupCommand buildGetKeysInGroupCommand(Set<Flag> flags, String groupName)
CommandsFactory
GetKeysInGroupCommand
used to fetch all the keys belonging to a group.buildGetKeysInGroupCommand
in interface CommandsFactory
groupName
- the group name.public <K> StreamRequestCommand<K> buildStreamRequestCommand(Object id, boolean parallelStream, StreamRequestCommand.Type type, Set<Integer> segments, Set<K> keys, Set<K> excludedKeys, boolean includeLoader, Object terminalOperation)
buildStreamRequestCommand
in interface CommandsFactory
public <R> StreamResponseCommand<R> buildStreamResponseCommand(Object identifier, boolean complete, Set<Integer> lostSegments, R response)
CommandsFactory
StreamResponseCommand
used to send back a response either intermediate or complete to the
originating node with the information for the stream request.buildStreamResponseCommand
in interface CommandsFactory
R
- type of responseidentifier
- 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 responsepublic GetCacheEntryCommand buildGetCacheEntryCommand(Object key, Set<Flag> explicitFlags)
CommandsFactory
buildGetCacheEntryCommand
in interface CommandsFactory
key
- key to getexplicitFlags
- Command flags provided by cachepublic ClusteredGetAllCommand buildClusteredGetAllCommand(List<?> keys, Set<Flag> flags, GlobalTransaction gtx)
CommandsFactory
buildClusteredGetAllCommand
in interface CommandsFactory
keys
- key to look uppublic <K,V,R> ReadOnlyKeyCommand<K,V,R> buildReadOnlyKeyCommand(K key, Function<EntryView.ReadEntryView<K,V>,R> f)
buildReadOnlyKeyCommand
in interface CommandsFactory
public <K,V,R> ReadOnlyManyCommand<K,V,R> buildReadOnlyManyCommand(Set<? extends K> keys, Function<EntryView.ReadEntryView<K,V>,R> f)
buildReadOnlyManyCommand
in interface CommandsFactory
public <K,V,R> ReadWriteKeyValueCommand<K,V,R> buildReadWriteKeyValueCommand(K key, V value, BiFunction<V,EntryView.ReadWriteEntryView<K,V>,R> f, Params params)
buildReadWriteKeyValueCommand
in interface CommandsFactory
public <K,V,R> ReadWriteKeyCommand<K,V,R> buildReadWriteKeyCommand(K key, Function<EntryView.ReadWriteEntryView<K,V>,R> f, Params params)
buildReadWriteKeyCommand
in interface CommandsFactory
public <K,V,R> ReadWriteManyCommand<K,V,R> buildReadWriteManyCommand(Set<? extends K> keys, Function<EntryView.ReadWriteEntryView<K,V>,R> f, Params params)
buildReadWriteManyCommand
in interface CommandsFactory
public <K,V,R> ReadWriteManyEntriesCommand<K,V,R> buildReadWriteManyEntriesCommand(Map<? extends K,? extends V> entries, BiFunction<V,EntryView.ReadWriteEntryView<K,V>,R> f, Params params)
buildReadWriteManyEntriesCommand
in interface CommandsFactory
public <K,V> WriteOnlyKeyCommand<K,V> buildWriteOnlyKeyCommand(K key, Consumer<EntryView.WriteEntryView<V>> f, Params params)
buildWriteOnlyKeyCommand
in interface CommandsFactory
public <K,V> WriteOnlyKeyValueCommand<K,V> buildWriteOnlyKeyValueCommand(K key, V value, BiConsumer<V,EntryView.WriteEntryView<V>> f, Params params)
buildWriteOnlyKeyValueCommand
in interface CommandsFactory
public <K,V> WriteOnlyManyCommand<K,V> buildWriteOnlyManyCommand(Set<? extends K> keys, Consumer<EntryView.WriteEntryView<V>> f, Params params)
buildWriteOnlyManyCommand
in interface CommandsFactory
public <K,V> WriteOnlyManyEntriesCommand<K,V> buildWriteOnlyManyEntriesCommand(Map<? extends K,? extends V> entries, BiConsumer<V,EntryView.WriteEntryView<V>> f, Params params)
buildWriteOnlyManyEntriesCommand
in interface CommandsFactory
Copyright © 2024 JBoss, a division of Red Hat. All rights reserved.