forked from External/mage
Big refactoring (server)
I used Intellij IDEA to automatically refactor code to achive 3 goals. 1) get rid of anonymouse classes, and replace the with lamba to get more readeable and clean code (like in TableWaitingDialog). 2) make effectively final variables actually final to avoid inadvertent changes on it in further releases and keep objects as immutable, as possible. 3) Get rid of unused imports (most of the changes) in whole project classes.
This commit is contained in:
parent
076840df53
commit
46d369c8ed
31 changed files with 510 additions and 822 deletions
|
|
@ -64,7 +64,7 @@ import org.apache.log4j.Logger;
|
|||
*/
|
||||
public class TableManager {
|
||||
|
||||
protected static ScheduledExecutorService expireExecutor = Executors.newSingleThreadScheduledExecutor();
|
||||
protected static final ScheduledExecutorService expireExecutor = Executors.newSingleThreadScheduledExecutor();
|
||||
|
||||
// protected static ScheduledExecutorService expireExecutor = ThreadExecutor.getInstance().getExpireExecutor();
|
||||
|
||||
|
|
@ -87,14 +87,11 @@ public class TableManager {
|
|||
}
|
||||
|
||||
private TableManager() {
|
||||
expireExecutor.scheduleAtFixedRate(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
checkTableHealthState();
|
||||
} catch(Exception ex) {
|
||||
logger.fatal("Check table health state job error:", ex);
|
||||
}
|
||||
expireExecutor.scheduleAtFixedRate(() -> {
|
||||
try {
|
||||
checkTableHealthState();
|
||||
} catch(Exception ex) {
|
||||
logger.fatal("Check table health state job error:", ex);
|
||||
}
|
||||
}, EXPIRE_CHECK_PERIOD, EXPIRE_CHECK_PERIOD, TimeUnit.MINUTES);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue