org.jboss.cache.factories
Class CommandsFactory
java.lang.Object
org.jboss.cache.factories.CommandsFactory
public class CommandsFactory
- extends Object
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
- 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)
|
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 |
buildGravitateDataCacheCommand(Fqn fqn,
boolean searchSubtrees)
|
GravitateDataCommand |
buildGravitateDataCommand(Fqn fqn,
Boolean searchSubtrees)
|
InvalidateCommand |
buildInvalidateCommand(Fqn fqn)
|
MoveCommand |
buildMoveCommand(Fqn from,
Fqn to)
|
OptimisticPrepareCommand |
buildOptimisticPrepareCommand(GlobalTransaction gtx,
List<ReversibleCommand> modifications,
Map data,
org.jgroups.Address address,
boolean onePhaseCommit)
|
OptimisticPrepareCommand |
buildOptimisticPrepareCommand(GlobalTransaction gtx,
ReversibleCommand command)
|
PrepareCommand |
buildPrepareCommand(GlobalTransaction gtx,
List<ReversibleCommand> modifications,
org.jgroups.Address address,
boolean onePhaseCommit)
|
PrepareCommand |
buildPrepareCommand(GlobalTransaction gtx,
ReversibleCommand command,
boolean onePhaseCommit)
|
PutDataMapCommand |
buildPutDataMapCommand(GlobalTransaction gtx,
Fqn fqn,
Map data,
boolean createUndoOps,
boolean eraseContents)
|
PutKeyValueCommand |
buildPutKeyValueCommand(GlobalTransaction gtx,
Fqn fqn,
Object key,
Object value,
boolean createUndoOps,
boolean putForExternalRead)
|
RemoveDataCommand |
buildRemoveDataCommand(GlobalTransaction gtx,
Fqn fqn,
boolean createUndoops,
boolean sendNodeEvent,
boolean eviction)
|
RemoveFromBuddyGroupCommand |
buildRemoveFromBuddyGroupCommand(String groupName)
|
RemoveKeyCommand |
buildRemoveKeyCommand(GlobalTransaction tx,
Fqn<?> fqn,
Object key,
boolean b)
|
RemoveNodeCommand |
buildRemoveNodeCommand(GlobalTransaction gtx,
Fqn fqn,
boolean eviction,
boolean skipSendingNodeEvents,
boolean createUndoOps)
|
ReplicateCommand |
buildReplicateCommand(List<ReplicableCommand> modifications)
|
ReplicateCommand |
buildReplicateCommand(ReplicableCommand command)
|
RollbackCommand |
buildRollbackCommand(GlobalTransaction gtx)
|
ReplicableCommand |
fromStream(int id,
Object[] parameters)
Builds a cache command based on the ID passed in and an object array of parameters |
void |
initialize(RPCManager rpc,
DataContainer dataContainer,
Notifier notifier,
BuddyManager buddyManager,
InterceptorChain invoker,
TransactionTable transactionTable,
CacheSPI cacheSpi,
Configuration configuration,
TransactionManager txManager)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CommandsFactory
public CommandsFactory()
initialize
public void initialize(RPCManager rpc,
DataContainer dataContainer,
Notifier notifier,
BuddyManager buddyManager,
InterceptorChain invoker,
TransactionTable transactionTable,
CacheSPI cacheSpi,
Configuration configuration,
TransactionManager txManager)
buildPutDataMapCommand
public PutDataMapCommand buildPutDataMapCommand(GlobalTransaction gtx,
Fqn fqn,
Map data,
boolean createUndoOps,
boolean eraseContents)
buildPutKeyValueCommand
public PutKeyValueCommand buildPutKeyValueCommand(GlobalTransaction gtx,
Fqn fqn,
Object key,
Object value,
boolean createUndoOps,
boolean putForExternalRead)
buildReplicateCommand
public ReplicateCommand buildReplicateCommand(ReplicableCommand command)
buildReplicateCommand
public ReplicateCommand buildReplicateCommand(List<ReplicableCommand> modifications)
buildPrepareCommand
public PrepareCommand buildPrepareCommand(GlobalTransaction gtx,
ReversibleCommand command,
boolean onePhaseCommit)
buildPrepareCommand
public PrepareCommand buildPrepareCommand(GlobalTransaction gtx,
List<ReversibleCommand> modifications,
org.jgroups.Address address,
boolean onePhaseCommit)
buildCommitCommand
public CommitCommand buildCommitCommand(GlobalTransaction gtx)
buildDataGravitationCleanupCommand
public DataGravitationCleanupCommand buildDataGravitationCleanupCommand(Fqn primaryFqn,
Fqn backupFqn)
buildGravitateDataCommand
public GravitateDataCommand buildGravitateDataCommand(Fqn fqn,
Boolean searchSubtrees)
buildRemoveNodeCommand
public RemoveNodeCommand buildRemoveNodeCommand(GlobalTransaction gtx,
Fqn fqn,
boolean eviction,
boolean skipSendingNodeEvents,
boolean createUndoOps)
buildRemoveDataCommand
public RemoveDataCommand buildRemoveDataCommand(GlobalTransaction gtx,
Fqn fqn,
boolean createUndoops,
boolean sendNodeEvent,
boolean eviction)
buildEvictFqnCommand
public EvictCommand buildEvictFqnCommand(Fqn fqn)
buildInvalidateCommand
public InvalidateCommand buildInvalidateCommand(Fqn fqn)
buildRemoveKeyCommand
public RemoveKeyCommand buildRemoveKeyCommand(GlobalTransaction tx,
Fqn<?> fqn,
Object key,
boolean b)
buildGetDataMapCommand
public GetDataMapCommand buildGetDataMapCommand(Fqn fqn)
buildExistsNodeCommand
public ExistsCommand buildExistsNodeCommand(Fqn fqn)
buildGetKeyValueCommand
public GetKeyValueCommand buildGetKeyValueCommand(Fqn<?> fqn,
Object key,
boolean sendNodeEvent)
buildGetNodeCommand
public GetNodeCommand buildGetNodeCommand(Fqn fqn)
buildGetKeysCommand
public GetKeysCommand buildGetKeysCommand(Fqn fqn)
buildGetChildrenNamesCommand
public GetChildrenNamesCommand buildGetChildrenNamesCommand(Fqn fqn)
buildMoveCommand
public MoveCommand buildMoveCommand(Fqn from,
Fqn to)
buildGravitateDataCacheCommand
public GravitateDataCommand buildGravitateDataCacheCommand(Fqn fqn,
boolean searchSubtrees)
buildRollbackCommand
public RollbackCommand buildRollbackCommand(GlobalTransaction gtx)
buildOptimisticPrepareCommand
public OptimisticPrepareCommand buildOptimisticPrepareCommand(GlobalTransaction gtx,
List<ReversibleCommand> modifications,
Map data,
org.jgroups.Address address,
boolean onePhaseCommit)
buildOptimisticPrepareCommand
public OptimisticPrepareCommand buildOptimisticPrepareCommand(GlobalTransaction gtx,
ReversibleCommand command)
buildAnnounceBuddyPoolNameCommand
public AnnounceBuddyPoolNameCommand buildAnnounceBuddyPoolNameCommand(org.jgroups.Address address,
String buddyPoolName)
buildRemoveFromBuddyGroupCommand
public RemoveFromBuddyGroupCommand buildRemoveFromBuddyGroupCommand(String groupName)
buildAssignToBuddyGroupCommand
public AssignToBuddyGroupCommand buildAssignToBuddyGroupCommand(BuddyGroup group,
Map<Fqn,byte[]> state)
buildClusteredGetCommand
public ClusteredGetCommand buildClusteredGetCommand(Boolean searchBackupSubtrees,
DataCommand dataCommand)
buildCreateNodeCommand
public CreateNodeCommand buildCreateNodeCommand(Fqn fqn)
fromStream
public 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 buildparameters
- parameters attached to the command
- Returns:
- a newly constructed cache command
Copyright © 2008 JBoss, a division of Red Hat. All Rights Reserved.