public class ReplicationQueueImpl extends Object implements ReplicationQueue
| Constructor and Description |
|---|
ReplicationQueueImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
add(ReplicableCommand job)
Adds a new command to the replication queue.
|
protected List<ReplicableCommand> |
drainReplQueue() |
int |
flush()
Flushes existing jobs in the replication queue, and returns the number of jobs flushed.
|
protected Configuration |
getConfiguration() |
int |
getElementsCount() |
void |
injectDependencies(ScheduledExecutorService executor,
RpcManager rpcManager,
Configuration configuration,
CommandsFactory commandsFactory,
Cache cache) |
void |
injectDependencies(ScheduledExecutorService executor,
RpcManager rpcManager,
Configuration configuration,
CommandsFactory commandsFactory,
String cacheName) |
boolean |
isEnabled() |
void |
reset()
Resets the replication queue, typically used when a cache is restarted.
|
void |
start()
Starts the asynchronous flush queue.
|
void |
stop()
Stops the asynchronous flush queue.
|
public boolean isEnabled()
isEnabled in interface ReplicationQueuepublic void injectDependencies(ScheduledExecutorService executor, RpcManager rpcManager, Configuration configuration, CommandsFactory commandsFactory, Cache cache)
public void injectDependencies(ScheduledExecutorService executor, RpcManager rpcManager, Configuration configuration, CommandsFactory commandsFactory, String cacheName)
public void start()
public void stop()
public void add(ReplicableCommand job)
ReplicationQueueadd in interface ReplicationQueuejob - command to add to the queuepublic int flush()
ReplicationQueueflush in interface ReplicationQueueprotected List<ReplicableCommand> drainReplQueue()
protected Configuration getConfiguration()
public int getElementsCount()
getElementsCount in interface ReplicationQueuepublic void reset()
ReplicationQueuereset in interface ReplicationQueueCopyright © 2014 JBoss, a division of Red Hat. All Rights Reserved.