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

Constructor Summary
CommandsFactoryImpl()
           
 
Method Summary
 ClearCommand buildClearCommand()
           
 ClusteredGetCommand buildClusteredGetCommand(Object key)
           
 CommitCommand buildCommitCommand(GlobalTransaction gtx)
           
 EvictCommand buildEvictCommand(Object key)
           
 GetKeyValueCommand buildGetKeyValueCommand(Object key)
           
 InvalidateCommand buildInvalidateCommand(Object... keys)
           
 InvalidateCommand buildInvalidateFromL1Command(Object... keys)
           
 LockControlCommand buildLockControlCommand(Collection keys, boolean lock)
           
 PrepareCommand buildPrepareCommand(GlobalTransaction gtx, List<WriteCommand> modifications, boolean onePhaseCommit)
           
 PutKeyValueCommand buildPutKeyValueCommand(Object key, Object value, long lifespanMillis, long maxIdleTimeMillis)
           
 PutMapCommand buildPutMapCommand(Map map, long lifespan, long maxIdleTimeMillis)
           
 RemoveCommand buildRemoveCommand(Object key, Object value)
           
 ReplaceCommand buildReplaceCommand(Object key, Object oldValue, Object newValue, long lifespan, long maxIdleTimeMillis)
           
 MultipleRpcCommand buildReplicateCommand(List<ReplicableCommand> toReplicate)
           
 RollbackCommand buildRollbackCommand(GlobalTransaction gtx)
           
 SingleRpcCommand buildSingleRpcCommand(ReplicableCommand call)
           
 SizeCommand buildSizeCommand()
           
 StateTransferControlCommand buildStateTransferControlCommand(boolean block)
           
 void initializeReplicableCommand(ReplicableCommand c)
          Initializes a ReplicableCommand read from a data stream with components specific to the target cache instance.
 void setupDependencies(DataContainer container, CacheNotifier notifier, Cache cache, InterceptorChain interceptorChain, CacheLoaderManager clManager, DistributionManager distributionManager, InvocationContextContainer icc, TransactionTable txTable)
           
 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 cache,
                              InterceptorChain interceptorChain,
                              CacheLoaderManager clManager,
                              DistributionManager distributionManager,
                              InvocationContextContainer icc,
                              TransactionTable txTable)

start

public void start()

buildPutKeyValueCommand

public PutKeyValueCommand buildPutKeyValueCommand(Object key,
                                                  Object value,
                                                  long lifespanMillis,
                                                  long maxIdleTimeMillis)
Specified by:
buildPutKeyValueCommand in interface CommandsFactory

buildRemoveCommand

public RemoveCommand buildRemoveCommand(Object key,
                                        Object value)
Specified by:
buildRemoveCommand in interface CommandsFactory

buildInvalidateCommand

public InvalidateCommand buildInvalidateCommand(Object... keys)
Specified by:
buildInvalidateCommand in interface CommandsFactory

buildInvalidateFromL1Command

public InvalidateCommand buildInvalidateFromL1Command(Object... keys)
Specified by:
buildInvalidateFromL1Command in interface CommandsFactory

buildReplaceCommand

public ReplaceCommand buildReplaceCommand(Object key,
                                          Object oldValue,
                                          Object newValue,
                                          long lifespan,
                                          long maxIdleTimeMillis)
Specified by:
buildReplaceCommand in interface CommandsFactory

buildSizeCommand

public SizeCommand buildSizeCommand()
Specified by:
buildSizeCommand in interface CommandsFactory

buildGetKeyValueCommand

public GetKeyValueCommand buildGetKeyValueCommand(Object key)
Specified by:
buildGetKeyValueCommand in interface CommandsFactory

buildPutMapCommand

public PutMapCommand buildPutMapCommand(Map map,
                                        long lifespan,
                                        long maxIdleTimeMillis)
Specified by:
buildPutMapCommand in interface CommandsFactory

buildClearCommand

public ClearCommand buildClearCommand()
Specified by:
buildClearCommand in interface CommandsFactory

buildEvictCommand

public EvictCommand buildEvictCommand(Object key)
Specified by:
buildEvictCommand in interface CommandsFactory

buildPrepareCommand

public PrepareCommand buildPrepareCommand(GlobalTransaction gtx,
                                          List<WriteCommand> modifications,
                                          boolean onePhaseCommit)
Specified by:
buildPrepareCommand in interface CommandsFactory

buildCommitCommand

public CommitCommand buildCommitCommand(GlobalTransaction gtx)
Specified by:
buildCommitCommand in interface CommandsFactory

buildRollbackCommand

public RollbackCommand buildRollbackCommand(GlobalTransaction gtx)
Specified by:
buildRollbackCommand in interface CommandsFactory

buildReplicateCommand

public MultipleRpcCommand buildReplicateCommand(List<ReplicableCommand> toReplicate)
Specified by:
buildReplicateCommand in interface CommandsFactory

buildSingleRpcCommand

public SingleRpcCommand buildSingleRpcCommand(ReplicableCommand call)
Specified by:
buildSingleRpcCommand in interface CommandsFactory

buildStateTransferControlCommand

public StateTransferControlCommand buildStateTransferControlCommand(boolean block)
Specified by:
buildStateTransferControlCommand in interface CommandsFactory

buildClusteredGetCommand

public ClusteredGetCommand buildClusteredGetCommand(Object key)
Specified by:
buildClusteredGetCommand in interface CommandsFactory

initializeReplicableCommand

public void initializeReplicableCommand(ReplicableCommand c)
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:
c - command to initialize. Cannot be null.

buildLockControlCommand

public LockControlCommand buildLockControlCommand(Collection keys,
                                                  boolean lock)
Specified by:
buildLockControlCommand in interface CommandsFactory


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