|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.infinispan.commands.CommandsFactoryImpl
public class CommandsFactoryImpl
Constructor Summary | |
---|---|
CommandsFactoryImpl()
|
Method Summary | |
---|---|
ClearCommand |
buildClearCommand()
Builds a ClearCommand |
ClusteredGetCommand |
buildClusteredGetCommand(Object key)
Builds a ClusteredGetCommand, which is a remote lookup command |
CommitCommand |
buildCommitCommand(GlobalTransaction gtx)
Builds a CommitCommand |
EntrySetCommand |
buildEntrySetCommand()
Builds a EntrySetCommand |
EvictCommand |
buildEvictCommand(Object key)
Builds an EvictCommand |
GetKeyValueCommand |
buildGetKeyValueCommand(Object key)
Builds a GetKeyValueCommand |
InvalidateCommand |
buildInvalidateCommand(Object... keys)
Builds an InvalidateCommand |
InvalidateCommand |
buildInvalidateFromL1Command(boolean forRehash,
Object... keys)
Builds an InvalidateFromL1Command |
KeySetCommand |
buildKeySetCommand()
Builds a KeySetCommand |
LockControlCommand |
buildLockControlCommand(Collection keys,
boolean implicit)
Builds a LockControlCommand to control explicit remote locking |
PrepareCommand |
buildPrepareCommand(GlobalTransaction gtx,
List<WriteCommand> modifications,
boolean onePhaseCommit)
Builds a PrepareCommand |
PutKeyValueCommand |
buildPutKeyValueCommand(Object key,
Object value,
long lifespanMillis,
long maxIdleTimeMillis)
Builds a PutKeyValueCommand |
PutMapCommand |
buildPutMapCommand(Map map,
long lifespan,
long maxIdleTimeMillis)
Builds a PutMapCommand |
RehashControlCommand |
buildRehashControlCommand(Address sender,
Map<Object,InternalCacheValue> state)
Builds a RehashControlCommand for coordinating a rehash event. |
RehashControlCommand |
buildRehashControlCommand(RehashControlCommand.Type type,
Address sender)
Builds a RehashControlCommand for coordinating a rehash event. |
RehashControlCommand |
buildRehashControlCommand(RehashControlCommand.Type type,
Address sender,
Map<Object,InternalCacheValue> state,
ConsistentHash consistentHash)
A more generic version of this factory method that allows the setting of various fields. |
RehashControlCommand |
buildRehashControlCommandTxLog(Address sender,
List<WriteCommand> commands)
Builds a RehashControlCommand for coordinating a rehash event. |
RehashControlCommand |
buildRehashControlCommandTxLogPendingPrepares(Address sender,
List<PrepareCommand> commands)
Builds a RehashControlCommand for coordinating a rehash event. |
RemoveCommand |
buildRemoveCommand(Object key,
Object value)
Builds a RemoveCommand |
ReplaceCommand |
buildReplaceCommand(Object key,
Object oldValue,
Object newValue,
long lifespan,
long maxIdleTimeMillis)
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 |
StateTransferControlCommand |
buildStateTransferControlCommand(boolean block)
Builds a StateTransferControlCommand |
ValuesCommand |
buildValuesCommand()
Builds a ValuesCommand |
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,
DistributionManager distributionManager,
InvocationContextContainer icc,
TransactionTable txTable,
Configuration configuration)
|
void |
start()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CommandsFactoryImpl()
Method Detail |
---|
public void setupDependencies(DataContainer container, CacheNotifier notifier, Cache cache, InterceptorChain interceptorChain, DistributionManager distributionManager, InvocationContextContainer icc, TransactionTable txTable, Configuration configuration)
public void start()
public PutKeyValueCommand buildPutKeyValueCommand(Object key, Object value, long lifespanMillis, long maxIdleTimeMillis)
CommandsFactory
buildPutKeyValueCommand
in interface CommandsFactory
key
- key to putvalue
- value to putlifespanMillis
- lifespan in milliseconds. -1 if lifespan is not used.maxIdleTimeMillis
- max idle time in milliseconds. -1 if maxIdle is not used.
public RemoveCommand buildRemoveCommand(Object key, Object value)
CommandsFactory
buildRemoveCommand
in interface CommandsFactory
key
- key to removevalue
- value to check for ina conditional remove, or null for an unconditional remove.
public InvalidateCommand buildInvalidateCommand(Object... keys)
CommandsFactory
buildInvalidateCommand
in interface CommandsFactory
keys
- keys to invalidate
public InvalidateCommand buildInvalidateFromL1Command(boolean forRehash, Object... keys)
CommandsFactory
buildInvalidateFromL1Command
in interface CommandsFactory
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
public ReplaceCommand buildReplaceCommand(Object key, Object oldValue, Object newValue, long lifespan, long maxIdleTimeMillis)
CommandsFactory
buildReplaceCommand
in interface CommandsFactory
key
- key to replaceoldValue
- existing value to check for if conditional, null if unconditional.newValue
- value to replace withlifespan
- lifespan in milliseconds. -1 if lifespan is not used.maxIdleTimeMillis
- max idle time in milliseconds. -1 if maxIdle is not used.
public SizeCommand buildSizeCommand()
CommandsFactory
buildSizeCommand
in interface CommandsFactory
public KeySetCommand buildKeySetCommand()
CommandsFactory
buildKeySetCommand
in interface CommandsFactory
public ValuesCommand buildValuesCommand()
CommandsFactory
buildValuesCommand
in interface CommandsFactory
public EntrySetCommand buildEntrySetCommand()
CommandsFactory
buildEntrySetCommand
in interface CommandsFactory
public GetKeyValueCommand buildGetKeyValueCommand(Object key)
CommandsFactory
buildGetKeyValueCommand
in interface CommandsFactory
key
- key to get
public PutMapCommand buildPutMapCommand(Map map, long lifespan, long maxIdleTimeMillis)
CommandsFactory
buildPutMapCommand
in interface CommandsFactory
map
- map containing key/value entries to putlifespan
- lifespan in milliseconds. -1 if lifespan is not used.maxIdleTimeMillis
- max idle time in milliseconds. -1 if maxIdle is not used.
public ClearCommand buildClearCommand()
CommandsFactory
buildClearCommand
in interface CommandsFactory
public EvictCommand buildEvictCommand(Object key)
CommandsFactory
buildEvictCommand
in interface CommandsFactory
key
- key to evict
public 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 CommitCommand buildCommitCommand(GlobalTransaction gtx)
CommandsFactory
buildCommitCommand
in interface CommandsFactory
gtx
- global transaction associated with the commit
public RollbackCommand buildRollbackCommand(GlobalTransaction gtx)
CommandsFactory
buildRollbackCommand
in interface CommandsFactory
gtx
- global transaction associated with the rollback
public MultipleRpcCommand buildReplicateCommand(List<ReplicableCommand> toReplicate)
CommandsFactory
buildReplicateCommand
in interface CommandsFactory
toReplicate
- ReplicableCommands to include in the envelope
public SingleRpcCommand buildSingleRpcCommand(ReplicableCommand call)
CommandsFactory
buildSingleRpcCommand
in interface CommandsFactory
call
- ReplicableCommand to include in the envelope
public StateTransferControlCommand buildStateTransferControlCommand(boolean block)
CommandsFactory
buildStateTransferControlCommand
in interface CommandsFactory
block
- whether to start blocking or not
public ClusteredGetCommand buildClusteredGetCommand(Object key)
CommandsFactory
buildClusteredGetCommand
in interface CommandsFactory
key
- key to look up
public void initializeReplicableCommand(ReplicableCommand c)
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
c
- command to initialize. Cannot be null.public LockControlCommand buildLockControlCommand(Collection keys, boolean implicit)
CommandsFactory
buildLockControlCommand
in interface CommandsFactory
keys
- keys to lockimplicit
- whether the lock command was implicit (triggered internally) or explicit (triggered by an API call)
public RehashControlCommand buildRehashControlCommand(RehashControlCommand.Type type, Address sender)
CommandsFactory
buildRehashControlCommand
in interface CommandsFactory
type
- type of RehashControlCommandsender
- sender's Address
public RehashControlCommand buildRehashControlCommand(Address sender, Map<Object,InternalCacheValue> state)
CommandsFactory
RehashControlCommand.Type
of this command is RehashControlCommand.Type.PUSH_STATE
.
buildRehashControlCommand
in interface CommandsFactory
sender
- sender's Addressstate
- state map to be pushed to the recipient of this command
public RehashControlCommand buildRehashControlCommandTxLog(Address sender, List<WriteCommand> commands)
CommandsFactory
RehashControlCommand.Type
of this command is RehashControlCommand.Type.DRAIN_TX
.
buildRehashControlCommandTxLog
in interface CommandsFactory
sender
- sender's Addresscommands
- list of writes
public RehashControlCommand buildRehashControlCommandTxLogPendingPrepares(Address sender, List<PrepareCommand> commands)
CommandsFactory
RehashControlCommand.Type
of this command is RehashControlCommand.Type.DRAIN_TX_PREPARES
.
buildRehashControlCommandTxLogPendingPrepares
in interface CommandsFactory
sender
- sender's Addresscommands
- list of pending prepares
public RehashControlCommand buildRehashControlCommand(RehashControlCommand.Type type, Address sender, Map<Object,InternalCacheValue> state, ConsistentHash consistentHash)
CommandsFactory
buildRehashControlCommand
in interface CommandsFactory
type
- type of RehashControlCommandsender
- sender's Addressstate
- state to pushconsistentHash
- consistent hash to deliver
|
Google Analytics | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |