Infinispan Distribution 5.2.6.Final-redhat-2

org.infinispan.commands
Class CommandsFactoryImpl

java.lang.Object
  extended by org.infinispan.commands.CommandsFactoryImpl
All Implemented Interfaces:
CommandsFactory

public class CommandsFactoryImpl
extends Object
implements CommandsFactory

Since:
4.0
Author:
Mircea.Markus@jboss.com, Galder ZamarreƱo, Sanne Grinovero (C) 2011 Red Hat Inc.

Constructor Summary
CommandsFactoryImpl()
           
 
Method Summary
 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
 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(String, String, false).
 CreateCacheCommand buildCreateCacheCommand(String cacheNameToCreate, String cacheConfigurationName, boolean start, 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.
 EntrySetCommand buildEntrySetCommand()
          Builds a EntrySetCommand
 EvictCommand buildEvictCommand(Object key, Set<Flag> flags)
          Builds an EvictCommand
 GetCacheEntryCommand buildGetCacheEntryCommand(Object key, Set<Flag> flags)
          Builds a GetKeyValueCommand
 GetInDoubtTransactionsCommand buildGetInDoubtTransactionsCommand()
          Builds a GetInDoubtTransactionsCommand.
 GetInDoubtTxInfoCommand buildGetInDoubtTxInfoCommand()
           
 GetKeyValueCommand buildGetKeyValueCommand(Object key, Set<Flag> flags)
          Builds a GetKeyValueCommand
 InvalidateCommand buildInvalidateCommand(Set<Flag> flags, Object... keys)
          Builds an InvalidateCommand
 InvalidateCommand buildInvalidateFromL1Command(Address origin, boolean forRehash, Set<Flag> flags, Collection<Object> keys)
           
 InvalidateCommand buildInvalidateFromL1Command(boolean forRehash, Set<Flag> flags, Collection<Object> keys)
          Builds an InvalidateFromL1Command
 InvalidateCommand buildInvalidateFromL1Command(boolean forRehash, Set<Flag> flags, Object... keys)
          Builds an InvalidateFromL1Command
 KeySetCommand buildKeySetCommand()
          Builds a KeySetCommand
 LockControlCommand buildLockControlCommand(Collection<Object> keys, Set<Flag> flags)
           
 LockControlCommand buildLockControlCommand(Collection<Object> 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>
MapCombineCommand<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, long lifespanMillis, long maxIdleTimeMillis, Set<Flag> flags)
          Builds a PutKeyValueCommand
 PutMapCommand buildPutMapCommand(Map<?,?> map, long lifespan, long maxIdleTimeMillis, Set<Flag> flags)
          Builds a PutMapCommand
<KOut,VOut>
ReduceCommand<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
 ReplaceCommand buildReplaceCommand(Object key, Object oldValue, Object newValue, long lifespan, long maxIdleTimeMillis, 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
 SizeCommand buildSizeCommand()
          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 viewId, Collection<StateChunk> stateChunks)
          Builds a StateResponseCommand used for pushing cache entries to another node in response to a StateRequestCommand.
 TxCompletionNotificationCommand buildTxCompletionNotificationCommand(long internalId)
           
 TxCompletionNotificationCommand buildTxCompletionNotificationCommand(Xid xid, GlobalTransaction globalTransaction)
          Builds a TxCompletionNotificationCommand.
 ValuesCommand buildValuesCommand()
          Builds a ValuesCommand
 VersionedCommitCommand buildVersionedCommitCommand(GlobalTransaction gtx)
          Builds a VersionedCommitCommand
 VersionedPrepareCommand buildVersionedPrepareCommand(GlobalTransaction gtx, List<WriteCommand> modifications, boolean onePhase)
          Builds a VersionedPrepareCommand
 VersionedPutKeyValueCommand buildVersionedPutKeyValueCommand(Object key, Object value, long lifespanMillis, long maxIdleTimeMillis, EntryVersion version, Set<Flag> flags)
          Builds a special form of PutKeyValueCommand that also holds a reference to a version to be applied.
 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 notifier, Cache<Object,Object> cache, InterceptorChain interceptorChain, DistributionManager distributionManager, InvocationContextContainer icc, 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)
           
 void start()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CommandsFactoryImpl

public CommandsFactoryImpl()
Method Detail

setupDependencies

public void setupDependencies(DataContainer container,
                              CacheNotifier notifier,
                              Cache<Object,Object> cache,
                              InterceptorChain interceptorChain,
                              DistributionManager distributionManager,
                              InvocationContextContainer icc,
                              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)

start

public void start()

buildPutKeyValueCommand

public PutKeyValueCommand buildPutKeyValueCommand(Object key,
                                                  Object value,
                                                  long lifespanMillis,
                                                  long maxIdleTimeMillis,
                                                  Set<Flag> flags)
Description copied from interface: CommandsFactory
Builds a PutKeyValueCommand

Specified by:
buildPutKeyValueCommand in interface CommandsFactory
Parameters:
key - key to put
value - value to put
lifespanMillis - lifespan in milliseconds. -1 if lifespan is not used.
maxIdleTimeMillis - max idle time in milliseconds. -1 if maxIdle is not used.
Returns:
a PutKeyValueCommand

buildVersionedPutKeyValueCommand

public VersionedPutKeyValueCommand buildVersionedPutKeyValueCommand(Object key,
                                                                    Object value,
                                                                    long lifespanMillis,
                                                                    long maxIdleTimeMillis,
                                                                    EntryVersion version,
                                                                    Set<Flag> flags)
Description copied from interface: CommandsFactory
Builds a special form of PutKeyValueCommand that also holds a reference to a version to be applied.

Specified by:
buildVersionedPutKeyValueCommand in interface CommandsFactory
Parameters:
key - key to put
value - value to put
lifespanMillis - lifespan in milliseconds. -1 if lifespan is not used.
maxIdleTimeMillis - max idle time in milliseconds. -1 if maxIdle is not used.
version - version to apply with this put
Returns:
a PutKeyValueCommand

buildRemoveCommand

public RemoveCommand buildRemoveCommand(Object key,
                                        Object value,
                                        Set<Flag> flags)
Description copied from interface: CommandsFactory
Builds a RemoveCommand

Specified by:
buildRemoveCommand in interface CommandsFactory
Parameters:
key - key to remove
value - value to check for ina conditional remove, or null for an unconditional remove.
Returns:
a RemoveCommand

buildInvalidateCommand

public InvalidateCommand buildInvalidateCommand(Set<Flag> flags,
                                                Object... keys)
Description copied from interface: CommandsFactory
Builds an InvalidateCommand

Specified by:
buildInvalidateCommand in interface CommandsFactory
keys - keys to invalidate
Returns:
an InvalidateCommand

buildInvalidateFromL1Command

public InvalidateCommand buildInvalidateFromL1Command(boolean forRehash,
                                                      Set<Flag> flags,
                                                      Object... keys)
Description copied from interface: CommandsFactory
Builds an InvalidateFromL1Command

Specified by:
buildInvalidateFromL1Command in interface CommandsFactory
Parameters:
forRehash - set to true if the invalidation is happening due to a new node taking ownership. False if it is due to a write, changing the state of the entry.
keys - keys to invalidate
Returns:
an InvalidateFromL1Command

buildInvalidateFromL1Command

public InvalidateCommand buildInvalidateFromL1Command(boolean forRehash,
                                                      Set<Flag> flags,
                                                      Collection<Object> keys)
Description copied from interface: CommandsFactory
Builds an InvalidateFromL1Command

Specified by:
buildInvalidateFromL1Command in interface CommandsFactory
Parameters:
forRehash - set to true if the invalidation is happening due to a new node taking ownership. False if it is due to a write, changing the state of the entry.
keys - keys to invalidate
Returns:
an InvalidateFromL1Command

buildInvalidateFromL1Command

public InvalidateCommand buildInvalidateFromL1Command(Address origin,
                                                      boolean forRehash,
                                                      Set<Flag> flags,
                                                      Collection<Object> keys)
Specified by:
buildInvalidateFromL1Command in interface CommandsFactory
See Also:
CommandsFactory.buildInvalidateFromL1Command(org.infinispan.remoting.transport.Address, boolean, java.util.Set, java.util.Collection)

buildReplaceCommand

public ReplaceCommand buildReplaceCommand(Object key,
                                          Object oldValue,
                                          Object newValue,
                                          long lifespan,
                                          long maxIdleTimeMillis,
                                          Set<Flag> flags)
Description copied from interface: CommandsFactory
Builds a ReplaceCommand

Specified by:
buildReplaceCommand in interface CommandsFactory
Parameters:
key - key to replace
oldValue - existing value to check for if conditional, null if unconditional.
newValue - value to replace with
lifespan - lifespan in milliseconds. -1 if lifespan is not used.
maxIdleTimeMillis - max idle time in milliseconds. -1 if maxIdle is not used.
Returns:
a ReplaceCommand

buildSizeCommand

public SizeCommand buildSizeCommand()
Description copied from interface: CommandsFactory
Builds a SizeCommand

Specified by:
buildSizeCommand in interface CommandsFactory
Returns:
a SizeCommand

buildKeySetCommand

public KeySetCommand buildKeySetCommand()
Description copied from interface: CommandsFactory
Builds a KeySetCommand

Specified by:
buildKeySetCommand in interface CommandsFactory
Returns:
a KeySetCommand

buildValuesCommand

public ValuesCommand buildValuesCommand()
Description copied from interface: CommandsFactory
Builds a ValuesCommand

Specified by:
buildValuesCommand in interface CommandsFactory
Returns:
a ValuesCommand

buildEntrySetCommand

public EntrySetCommand buildEntrySetCommand()
Description copied from interface: CommandsFactory
Builds a EntrySetCommand

Specified by:
buildEntrySetCommand in interface CommandsFactory
Returns:
a EntrySetCommand

buildGetKeyValueCommand

public GetKeyValueCommand buildGetKeyValueCommand(Object key,
                                                  Set<Flag> flags)
Description copied from interface: CommandsFactory
Builds a GetKeyValueCommand

Specified by:
buildGetKeyValueCommand in interface CommandsFactory
Parameters:
key - key to get
Returns:
a GetKeyValueCommand

buildGetCacheEntryCommand

public GetCacheEntryCommand buildGetCacheEntryCommand(Object key,
                                                      Set<Flag> flags)
Description copied from interface: CommandsFactory
Builds a GetKeyValueCommand

Specified by:
buildGetCacheEntryCommand in interface CommandsFactory
Parameters:
key - key to get
Returns:
a GetKeyValueCommand

buildPutMapCommand

public PutMapCommand buildPutMapCommand(Map<?,?> map,
                                        long lifespan,
                                        long maxIdleTimeMillis,
                                        Set<Flag> flags)
Description copied from interface: CommandsFactory
Builds a PutMapCommand

Specified by:
buildPutMapCommand in interface CommandsFactory
Parameters:
map - map containing key/value entries to put
lifespan - lifespan in milliseconds. -1 if lifespan is not used.
maxIdleTimeMillis - max idle time in milliseconds. -1 if maxIdle is not used.
Returns:
a PutMapCommand

buildClearCommand

public ClearCommand buildClearCommand(Set<Flag> flags)
Description copied from interface: CommandsFactory
Builds a ClearCommand

Specified by:
buildClearCommand in interface CommandsFactory
Returns:
a ClearCommand

buildEvictCommand

public EvictCommand buildEvictCommand(Object key,
                                      Set<Flag> flags)
Description copied from interface: CommandsFactory
Builds an EvictCommand

Specified by:
buildEvictCommand in interface CommandsFactory
Parameters:
key - key to evict
Returns:
an EvictCommand

buildPrepareCommand

public PrepareCommand buildPrepareCommand(GlobalTransaction gtx,
                                          List<WriteCommand> modifications,
                                          boolean onePhaseCommit)
Description copied from interface: CommandsFactory
Builds a PrepareCommand

Specified by:
buildPrepareCommand in interface CommandsFactory
Parameters:
gtx - global transaction associated with the prepare
modifications - list of modifications
onePhaseCommit - is this a one-phase or two-phase transaction?
Returns:
a PrepareCommand

buildVersionedPrepareCommand

public VersionedPrepareCommand buildVersionedPrepareCommand(GlobalTransaction gtx,
                                                            List<WriteCommand> modifications,
                                                            boolean onePhase)
Description copied from interface: CommandsFactory
Builds a VersionedPrepareCommand

Specified by:
buildVersionedPrepareCommand in interface CommandsFactory
Parameters:
gtx - global transaction associated with the prepare
modifications - list of modifications
Returns:
a VersionedPrepareCommand

buildCommitCommand

public CommitCommand buildCommitCommand(GlobalTransaction gtx)
Description copied from interface: CommandsFactory
Builds a CommitCommand

Specified by:
buildCommitCommand in interface CommandsFactory
Parameters:
gtx - global transaction associated with the commit
Returns:
a CommitCommand

buildVersionedCommitCommand

public VersionedCommitCommand buildVersionedCommitCommand(GlobalTransaction gtx)
Description copied from interface: CommandsFactory
Builds a VersionedCommitCommand

Specified by:
buildVersionedCommitCommand in interface CommandsFactory
Parameters:
gtx - global transaction associated with the commit
Returns:
a VersionedCommitCommand

buildRollbackCommand

public RollbackCommand buildRollbackCommand(GlobalTransaction gtx)
Description copied from interface: CommandsFactory
Builds a RollbackCommand

Specified by:
buildRollbackCommand in interface CommandsFactory
Parameters:
gtx - global transaction associated with the rollback
Returns:
a RollbackCommand

buildReplicateCommand

public MultipleRpcCommand buildReplicateCommand(List<ReplicableCommand> toReplicate)
Description copied from interface: CommandsFactory
Builds an RpcCommand "envelope" containing multiple ReplicableCommands

Specified by:
buildReplicateCommand in interface CommandsFactory
Parameters:
toReplicate - ReplicableCommands to include in the envelope
Returns:
a MultipleRpcCommand

buildSingleRpcCommand

public SingleRpcCommand buildSingleRpcCommand(ReplicableCommand call)
Description copied from interface: CommandsFactory
Builds a SingleRpcCommand "envelope" containing a single ReplicableCommand

Specified by:
buildSingleRpcCommand in interface CommandsFactory
Parameters:
call - ReplicableCommand to include in the envelope
Returns:
a SingleRpcCommand

buildClusteredGetCommand

public ClusteredGetCommand buildClusteredGetCommand(Object key,
                                                    Set<Flag> flags,
                                                    boolean acquireRemoteLock,
                                                    GlobalTransaction gtx)
Description copied from interface: CommandsFactory
Builds a ClusteredGetCommand, which is a remote lookup command

Specified by:
buildClusteredGetCommand in interface CommandsFactory
Parameters:
key - key to look up
Returns:
a ClusteredGetCommand

initializeReplicableCommand

public void initializeReplicableCommand(ReplicableCommand c,
                                        boolean isRemote)
Description copied from interface: CommandsFactory
Initializes a 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.

Specified by:
initializeReplicableCommand in interface CommandsFactory
Parameters:
isRemote - true if the command is deserialized and is executed remote.
c - command to initialize. Cannot be null.

buildLockControlCommand

public LockControlCommand buildLockControlCommand(Collection<Object> keys,
                                                  Set<Flag> flags,
                                                  GlobalTransaction gtx)
Description copied from interface: CommandsFactory
Builds a LockControlCommand to control explicit remote locking

Specified by:
buildLockControlCommand in interface CommandsFactory
Parameters:
keys - keys to lock
Returns:
a LockControlCommand

buildLockControlCommand

public LockControlCommand buildLockControlCommand(Object key,
                                                  Set<Flag> flags,
                                                  GlobalTransaction gtx)
Description copied from interface: CommandsFactory
Same as CommandsFactory.buildLockControlCommand(Object, java.util.Set, org.infinispan.transaction.xa.GlobalTransaction) but for locking a single key vs a collection of keys.

Specified by:
buildLockControlCommand in interface CommandsFactory

buildLockControlCommand

public LockControlCommand buildLockControlCommand(Collection<Object> keys,
                                                  Set<Flag> flags)
Specified by:
buildLockControlCommand in interface CommandsFactory

buildStateRequestCommand

public StateRequestCommand buildStateRequestCommand(StateRequestCommand.Type subtype,
                                                    Address sender,
                                                    int viewId,
                                                    Set<Integer> segments)
Description copied from interface: CommandsFactory
Builds a StateRequestCommand used for requesting transactions and locks and for starting or canceling transfer of cache entries.

Specified by:
buildStateRequestCommand in interface CommandsFactory

buildStateResponseCommand

public StateResponseCommand buildStateResponseCommand(Address sender,
                                                      int viewId,
                                                      Collection<StateChunk> stateChunks)
Description copied from interface: CommandsFactory
Builds a StateResponseCommand used for pushing cache entries to another node in response to a StateRequestCommand.

Specified by:
buildStateResponseCommand in interface CommandsFactory

getCacheName

public String getCacheName()
Description copied from interface: CommandsFactory
Retrieves the cache name this CommandFactory is set up to construct commands for.

Specified by:
getCacheName in interface CommandsFactory
Returns:
the name of the cache this CommandFactory is set up to construct commands for.

buildGetInDoubtTransactionsCommand

public GetInDoubtTransactionsCommand buildGetInDoubtTransactionsCommand()
Description copied from interface: CommandsFactory
Builds a GetInDoubtTransactionsCommand.

Specified by:
buildGetInDoubtTransactionsCommand in interface CommandsFactory

buildTxCompletionNotificationCommand

public TxCompletionNotificationCommand buildTxCompletionNotificationCommand(Xid xid,
                                                                            GlobalTransaction globalTransaction)
Description copied from interface: CommandsFactory
Builds a TxCompletionNotificationCommand.

Specified by:
buildTxCompletionNotificationCommand in interface CommandsFactory

buildTxCompletionNotificationCommand

public TxCompletionNotificationCommand buildTxCompletionNotificationCommand(long internalId)
Specified by:
buildTxCompletionNotificationCommand in interface CommandsFactory
Parameters:
internalId - the internal id identifying the transaction to be removed.
See Also:
TxCompletionNotificationCommand

buildDistributedExecuteCommand

public <T> DistributedExecuteCommand<T> buildDistributedExecuteCommand(Callable<T> callable,
                                                                       Address sender,
                                                                       Collection keys)
Description copied from interface: CommandsFactory
Builds a DistributedExecuteCommand used for migration and execution of distributed Callables and Runnables.

Specified by:
buildDistributedExecuteCommand in interface CommandsFactory
Parameters:
callable - the callable task
sender - sender's Address
keys - keys used in Callable
Returns:
a DistributedExecuteCommand

buildMapCombineCommand

public <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)
Description copied from interface: CommandsFactory
Builds a MapCombineCommand used for migration and map phase execution of MapReduce tasks.

Specified by:
buildMapCombineCommand in interface CommandsFactory
m - Mapper for MapReduceTask
r - Combiner for MapReduceTask
keys - keys used in MapReduceTask
Returns:
created MapCombineCommand

buildGetInDoubtTxInfoCommand

public GetInDoubtTxInfoCommand buildGetInDoubtTxInfoCommand()
Specified by:
buildGetInDoubtTxInfoCommand in interface CommandsFactory
See Also:
GetInDoubtTxInfoCommand

buildCompleteTransactionCommand

public CompleteTransactionCommand buildCompleteTransactionCommand(Xid xid,
                                                                  boolean commit)
Description copied from interface: CommandsFactory
Builds a CompleteTransactionCommand command.

Specified by:
buildCompleteTransactionCommand in interface CommandsFactory
Parameters:
xid - the xid identifying the transaction we want to complete.
commit - commit(true) or rollback(false)?

buildApplyDeltaCommand

public ApplyDeltaCommand buildApplyDeltaCommand(Object deltaAwareValueKey,
                                                Delta delta,
                                                Collection keys)
Description copied from interface: CommandsFactory
Builds a ApplyDeltaCommand used for applying Delta objects to DeltaAware containers stored in cache

Specified by:
buildApplyDeltaCommand in interface CommandsFactory
Returns:
ApplyDeltaCommand instance
See Also:
ApplyDeltaCommand

buildCreateCacheCommand

public CreateCacheCommand buildCreateCacheCommand(String cacheNameToCreate,
                                                  String cacheConfigurationName)
Description copied from interface: CommandsFactory
Same as #buildCreateCacheCommand(String, String, false).

Specified by:
buildCreateCacheCommand in interface CommandsFactory

buildCreateCacheCommand

public CreateCacheCommand buildCreateCacheCommand(String cacheNameToCreate,
                                                  String cacheConfigurationName,
                                                  boolean start,
                                                  int size)
Description copied from interface: CommandsFactory
Builds a CreateCacheCommand used to create/start cache around Infinispan cluster

Specified by:
buildCreateCacheCommand in interface CommandsFactory
start - if true, then this command also makes sure that the cache is started on all the nodes in the cluster.
size - the expected number of nodes where this node runs

buildReduceCommand

public <KOut,VOut> ReduceCommand<KOut,VOut> buildReduceCommand(String taskId,
                                                               String destintationCache,
                                                               Reducer<KOut,VOut> r,
                                                               Collection<KOut> keys)
Description copied from interface: CommandsFactory
Builds a ReduceCommand used for migration and reduce phase execution of MapReduce tasks.

Specified by:
buildReduceCommand in interface CommandsFactory
r - Reducer for MapReduceTask
keys - keys used in MapReduceTask
Returns:
created ReduceCommand

buildCancelCommandCommand

public CancelCommand buildCancelCommandCommand(UUID commandUUID)
Description copied from interface: CommandsFactory
Builds CancelCommandCommand used to cancel other commands executing on Infinispan cluster

Specified by:
buildCancelCommandCommand in interface CommandsFactory
Parameters:
commandUUID - UUID for command to cancel
Returns:
created CancelCommandCommand

Infinispan Distribution 5.2.6.Final-redhat-2

Copyright © 2013 JBoss, a division of Red Hat. All Rights Reserved.