mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-12 15:21:00 +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 {
|
public class Replicator implements Runnable {
|
||||||
private final static Logger logger = Logger.getLogger(Replicator.class.getName());
|
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 static final int CHECK_COUNT = 150; // how long to check, value is CHECK_INTERVAL second steps
|
||||||
|
|
||||||
private final ReplicationMasterDescriptor master;
|
private final ReplicationMasterDescriptor master;
|
||||||
@@ -124,7 +124,7 @@ public class Replicator implements Runnable {
|
|||||||
logger.info(sse.getMessage());
|
logger.info(sse.getMessage());
|
||||||
if (checksPerformed <= CHECK_COUNT) {
|
if (checksPerformed <= CHECK_COUNT) {
|
||||||
try {
|
try {
|
||||||
Thread.sleep(CHECK_INTERVAL);
|
Thread.sleep(CHECK_INTERVAL_MILLIS);
|
||||||
|
|
||||||
/* isOpen() will return false if the channel has been closed. This
|
/* isOpen() will return false if the channel has been closed. This
|
||||||
* does not hold when the connection is dropped.
|
* does not hold when the connection is dropped.
|
||||||
@@ -134,7 +134,7 @@ public class Replicator implements Runnable {
|
|||||||
try {
|
try {
|
||||||
logger.info("Channel seems to be closed. Trying to reconnect consumer queue...");
|
logger.info("Channel seems to be closed. Trying to reconnect consumer queue...");
|
||||||
this.consumer = master.getConsumer();
|
this.consumer = master.getConsumer();
|
||||||
Thread.sleep(CHECK_INTERVAL);
|
Thread.sleep(CHECK_INTERVAL_MILLIS);
|
||||||
checksPerformed += 1;
|
checksPerformed += 1;
|
||||||
} catch (IOException eio) {
|
} catch (IOException eio) {
|
||||||
eio.printStackTrace();
|
eio.printStackTrace();
|
||||||
@@ -146,7 +146,7 @@ public class Replicator implements Runnable {
|
|||||||
checksPerformed += 1;
|
checksPerformed += 1;
|
||||||
continue;
|
continue;
|
||||||
} else {
|
} 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
|
// XXX: Also make sure that all handlers get notifications about this
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user