org.jboss.cache.commands
Interface CommandsFactory

All Known Implementing Classes:
CommandsFactoryImpl, OptimisticCommandsFactoryImpl, PessimisticCommandsFactoryImpl

public interface CommandsFactory

Factory for all types of cache commands. Here are some of the purposes of this class:

   - not creating CacheCommands directly (i.e. through new usage) as this would reduce unit testability
   - reduce the coupling between commands and other components. e.g. considering a commands that needs to knwo whether
     locking type is optimistic, we will pass in a 'optimistic' boolean flag rather than entire Configuration object
 

Note: As of 3.0, this is now an interface.

Since:
2.2
Author:
Mircea.Markus@jboss.com

Method Summary
 AnnounceBuddyPoolNameCommand buildAnnounceBuddyPoolNameCommand(org.jgroups.Address address, String buddyPoolName)
           
 AssignToBuddyGroupCommand buildAssignToBuddyGroupCommand(BuddyGroup group, Map<Fqn,byte[]> state)
           
 ClearDataCommand buildClearDataCommand(GlobalTransaction gtx, Fqn fqn)
           
 ClusteredGetCommand buildClusteredGetCommand(Boolean searchBackupSubtrees, DataCommand dataCommand)
           
 CommitCommand buildCommitCommand(GlobalTransaction gtx)
           
 CreateNodeCommand buildCreateNodeCommand(Fqn fqn)
           
 DataGravitationCleanupCommand buildDataGravitationCleanupCommand(Fqn primaryFqn, Fqn backupFqn)
           
 EvictCommand buildEvictFqnCommand(Fqn fqn)
           
 ExistsCommand buildExistsNodeCommand(Fqn fqn)
           
 GetChildrenNamesCommand buildGetChildrenNamesCommand(Fqn fqn)
           
 GetDataMapCommand buildGetDataMapCommand(Fqn fqn)
           
 GetKeysCommand buildGetKeysCommand(Fqn fqn)
           
 GetKeyValueCommand buildGetKeyValueCommand(Fqn fqn, Object key, boolean sendNodeEvent)
           
 GetNodeCommand buildGetNodeCommand(Fqn fqn)
           
 GravitateDataCommand buildGravitateDataCommand(Fqn fqn, Boolean searchSubtrees)
           
 InvalidateCommand buildInvalidateCommand(Fqn fqn)
           
 MoveCommand buildMoveCommand(Fqn from, Fqn to)
           
 OptimisticPrepareCommand buildOptimisticPrepareCommand(GlobalTransaction gtx, List<WriteCommand> modifications, org.jgroups.Address address, boolean onePhaseCommit)
           
 PrepareCommand buildPrepareCommand(GlobalTransaction gtx, List<WriteCommand> modifications, org.jgroups.Address address, boolean onePhaseCommit)
           
 PrepareCommand buildPrepareCommand(GlobalTransaction gtx, WriteCommand command, boolean onePhaseCommit)
           
 PutDataMapCommand buildPutDataMapCommand(GlobalTransaction gtx, Fqn fqn, Map data)
           
 PutForExternalReadCommand buildPutForExternalReadCommand(GlobalTransaction gtx, Fqn fqn, Object key, Object value)
           
 PutKeyValueCommand buildPutKeyValueCommand(GlobalTransaction gtx, Fqn fqn, Object key, Object value)
           
 RemoveFromBuddyGroupCommand buildRemoveFromBuddyGroupCommand(String groupName)
           
 RemoveKeyCommand buildRemoveKeyCommand(GlobalTransaction tx, Fqn fqn, Object key)
           
 RemoveNodeCommand buildRemoveNodeCommand(GlobalTransaction gtx, Fqn fqn)
           
 ReplicateCommand buildReplicateCommand(List<ReplicableCommand> modifications)
           
 ReplicateCommand buildReplicateCommand(ReplicableCommand command)
           
 RollbackCommand buildRollbackCommand(GlobalTransaction gtx)
           
 StateTransferControlCommand buildStateTransferControlCommand(boolean b)
           
 ReplicableCommand fromStream(int id, Object[] parameters)
          Builds a cache command based on the ID passed in and an object array of parameters
 

Method Detail

buildPutDataMapCommand

PutDataMapCommand buildPutDataMapCommand(GlobalTransaction gtx,
                                         Fqn fqn,
                                         Map data)

buildPutKeyValueCommand

PutKeyValueCommand buildPutKeyValueCommand(GlobalTransaction gtx,
                                           Fqn fqn,
                                           Object key,
                                           Object value)

buildPutForExternalReadCommand

PutForExternalReadCommand buildPutForExternalReadCommand(GlobalTransaction gtx,
                                                         Fqn fqn,
                                                         Object key,
                                                         Object value)

buildReplicateCommand

ReplicateCommand buildReplicateCommand(ReplicableCommand command)

buildReplicateCommand

ReplicateCommand buildReplicateCommand(List<ReplicableCommand> modifications)

buildPrepareCommand

PrepareCommand buildPrepareCommand(GlobalTransaction gtx,
                                   WriteCommand command,
                                   boolean onePhaseCommit)

buildPrepareCommand

PrepareCommand buildPrepareCommand(GlobalTransaction gtx,
                                   List<WriteCommand> modifications,
                                   org.jgroups.Address address,
                                   boolean onePhaseCommit)

buildCommitCommand

CommitCommand buildCommitCommand(GlobalTransaction gtx)

buildDataGravitationCleanupCommand

DataGravitationCleanupCommand buildDataGravitationCleanupCommand(Fqn primaryFqn,
                                                                 Fqn backupFqn)

buildGravitateDataCommand

GravitateDataCommand buildGravitateDataCommand(Fqn fqn,
                                               Boolean searchSubtrees)

buildRemoveNodeCommand

RemoveNodeCommand buildRemoveNodeCommand(GlobalTransaction gtx,
                                         Fqn fqn)

buildClearDataCommand

ClearDataCommand buildClearDataCommand(GlobalTransaction gtx,
                                       Fqn fqn)

buildEvictFqnCommand

EvictCommand buildEvictFqnCommand(Fqn fqn)

buildInvalidateCommand

InvalidateCommand buildInvalidateCommand(Fqn fqn)

buildRemoveKeyCommand

RemoveKeyCommand buildRemoveKeyCommand(GlobalTransaction tx,
                                       Fqn fqn,
                                       Object key)

buildGetDataMapCommand

GetDataMapCommand buildGetDataMapCommand(Fqn fqn)

buildExistsNodeCommand

ExistsCommand buildExistsNodeCommand(Fqn fqn)

buildGetKeyValueCommand

GetKeyValueCommand buildGetKeyValueCommand(Fqn fqn,
                                           Object key,
                                           boolean sendNodeEvent)

buildGetNodeCommand

GetNodeCommand buildGetNodeCommand(Fqn fqn)

buildGetKeysCommand

GetKeysCommand buildGetKeysCommand(Fqn fqn)

buildGetChildrenNamesCommand

GetChildrenNamesCommand buildGetChildrenNamesCommand(Fqn fqn)

buildMoveCommand

MoveCommand buildMoveCommand(Fqn from,
                             Fqn to)

buildRollbackCommand

RollbackCommand buildRollbackCommand(GlobalTransaction gtx)

buildOptimisticPrepareCommand

OptimisticPrepareCommand buildOptimisticPrepareCommand(GlobalTransaction gtx,
                                                       List<WriteCommand> modifications,
                                                       org.jgroups.Address address,
                                                       boolean onePhaseCommit)

buildAnnounceBuddyPoolNameCommand

AnnounceBuddyPoolNameCommand buildAnnounceBuddyPoolNameCommand(org.jgroups.Address address,
                                                               String buddyPoolName)

buildRemoveFromBuddyGroupCommand

RemoveFromBuddyGroupCommand buildRemoveFromBuddyGroupCommand(String groupName)

buildAssignToBuddyGroupCommand

AssignToBuddyGroupCommand buildAssignToBuddyGroupCommand(BuddyGroup group,
                                                         Map<Fqn,byte[]> state)

buildClusteredGetCommand

ClusteredGetCommand buildClusteredGetCommand(Boolean searchBackupSubtrees,
                                             DataCommand dataCommand)

buildCreateNodeCommand

CreateNodeCommand buildCreateNodeCommand(Fqn fqn)

fromStream

ReplicableCommand fromStream(int id,
                             Object[] parameters)
Builds a cache command based on the ID passed in and an object array of parameters

Parameters:
id - id of the command to build
parameters - parameters attached to the command
Returns:
a newly constructed cache command

buildStateTransferControlCommand

StateTransferControlCommand buildStateTransferControlCommand(boolean b)


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