Author: manik.surtani(a)jboss.com
Date: 2009-02-19 08:48:03 -0500 (Thu, 19 Feb 2009)
New Revision: 7736
Modified:
core/branches/flat/src/main/java/org/horizon/remoting/ReplicationQueue.java
Log:
Removed unused field
Modified: core/branches/flat/src/main/java/org/horizon/remoting/ReplicationQueue.java
===================================================================
--- core/branches/flat/src/main/java/org/horizon/remoting/ReplicationQueue.java 2009-02-19
13:40:55 UTC (rev 7735)
+++ core/branches/flat/src/main/java/org/horizon/remoting/ReplicationQueue.java 2009-02-19
13:48:03 UTC (rev 7736)
@@ -89,9 +89,7 @@
@Start
public synchronized void start() {
long interval = configuration.getReplQueueInterval();
- if (log.isTraceEnabled()) {
- log.trace("Starting replication queue, with interval=" + interval
+", and maxElements=" + maxElements);
- }
+ log.trace("Starting replication queue, with interval {0} and maxElements
{1}", interval, maxElements);
this.maxElements = configuration.getReplQueueMaxElements();
// check again
enabled = configuration.isUseReplQueue();
@@ -135,15 +133,15 @@
public void flush() {
List<ReplicableCommand> toReplicate;
synchronized (elements) {
- if (log.isTraceEnabled())
- log.trace("flush(): flushing repl queue (num elements=" +
elements.size() + ")");
+ if (log.isTraceEnabled()) log.trace("flush(): flushing repl queue (num
elements={0})", elements.size());
toReplicate = new ArrayList<ReplicableCommand>(elements);
elements.clear();
}
- if (toReplicate.size() > 0) {
+ int toReplicateSize = toReplicate.size();
+ if (toReplicateSize > 0) {
try {
- if (log.isTraceEnabled()) log.trace("Flushing " +
toReplicate.size() + " elements " );
+ log.trace("Flushing {0} elements", toReplicateSize);
ReplicateCommand replicateCommand =
commandsFactory.buildReplicateCommand(toReplicate);
// send to all live nodes in the cluster
rpcManager.invokeRemotely(null, replicateCommand, ResponseMode.ASYNCHRONOUS,
configuration.getSyncReplTimeout());
Show replies by date