mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-11 06:40:53 +00:00
renamed constant to indicate unit
This commit is contained in:
1 parent
848c0fbac7
commit
bbd3168092
1 file changed
+4
-4
+4
-4
@@ -33,7 +33,7 @@ import com.sap.sailing.server.replication.ReplicationMasterDescriptor;
|
||||
public class Replicator implements Runnable {
|
||||
private final static Logger logger = Logger.getLogger(Replicator.class.getName());
|
||||
|
||||
private static final long CHECK_INTERVAL = 2000; // how long (milliseconds) to pause before checking connection again
|
||||
private static final long CHECK_INTERVAL_MILLIS = 2000; // how long (milliseconds) to pause before checking connection again
|
||||
private static final int CHECK_COUNT = 150; // how long to check, value is CHECK_INTERVAL second steps
|
||||
|
||||
private final ReplicationMasterDescriptor master;
|
||||
@@ -124,7 +124,7 @@ public class Replicator implements Runnable {
|
||||
logger.info(sse.getMessage());
|
||||
if (checksPerformed <= CHECK_COUNT) {
|
||||
try {
|
||||
Thread.sleep(CHECK_INTERVAL);
|
||||
Thread.sleep(CHECK_INTERVAL_MILLIS);
|
||||
|
||||
/* isOpen() will return false if the channel has been closed. This
|
||||
* does not hold when the connection is dropped.
|
||||
@@ -134,7 +134,7 @@ public class Replicator implements Runnable {
|
||||
try {
|
||||
logger.info("Channel seems to be closed. Trying to reconnect consumer queue...");
|
||||
this.consumer = master.getConsumer();
|
||||
Thread.sleep(CHECK_INTERVAL);
|
||||
Thread.sleep(CHECK_INTERVAL_MILLIS);
|
||||
checksPerformed += 1;
|
||||
} catch (IOException eio) {
|
||||
eio.printStackTrace();
|
||||
@@ -146,7 +146,7 @@ public class Replicator implements Runnable {
|
||||
checksPerformed += 1;
|
||||
continue;
|
||||
} else {
|
||||
logger.severe("Grace time (" + CHECK_COUNT*(CHECK_INTERVAL/1000) + "secs) is over. Terminating replication listener " + this.toString());
|
||||
logger.severe("Grace time (" + CHECK_COUNT*(CHECK_INTERVAL_MILLIS/1000) + "secs) is over. Terminating replication listener " + this.toString());
|
||||
// XXX: Also make sure that all handlers get notifications about this
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user