#575 Hotfix for reload support
- Create temporary method for reloading any stateful entities -> a lot of duplicated code, to be fixed soon within #432 - Remove unused methods
This commit is contained in:
@@ -162,12 +162,6 @@ public class CacheDataSource implements DataSource {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void reload() { // unused method
|
||||
source.reload();
|
||||
cachedAuths.invalidateAll();
|
||||
}
|
||||
|
||||
@Override
|
||||
public synchronized boolean updateEmail(final PlayerAuth auth) {
|
||||
boolean result = source.updateEmail(auth);
|
||||
|
||||
@@ -121,8 +121,6 @@ public interface DataSource {
|
||||
*/
|
||||
void close();
|
||||
|
||||
void reload();
|
||||
|
||||
/**
|
||||
* Method purgeBanned.
|
||||
*
|
||||
|
||||
@@ -419,10 +419,6 @@ public class FlatFile implements DataSource {
|
||||
public synchronized void close() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void reload() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean updateEmail(PlayerAuth auth) {
|
||||
if (!isAuthAvailable(auth.getNickname())) {
|
||||
|
||||
@@ -3,7 +3,6 @@ package fr.xephi.authme.datasource;
|
||||
import com.google.common.annotations.VisibleForTesting;
|
||||
import com.zaxxer.hikari.HikariDataSource;
|
||||
import com.zaxxer.hikari.pool.HikariPool.PoolInitializationException;
|
||||
import fr.xephi.authme.AuthMe;
|
||||
import fr.xephi.authme.ConsoleLogger;
|
||||
import fr.xephi.authme.cache.auth.PlayerAuth;
|
||||
import fr.xephi.authme.security.HashAlgorithm;
|
||||
@@ -695,17 +694,6 @@ public class MySQL implements DataSource {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void reload() {
|
||||
try {
|
||||
reloadArguments();
|
||||
} catch (Exception ex) {
|
||||
ConsoleLogger.logException("Can't reconnect to MySQL database... " +
|
||||
"Please check your MySQL configuration! Encountered", ex);
|
||||
AuthMe.getInstance().stopOrUnload();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public synchronized void close() {
|
||||
if (ds != null && !ds.isClosed()) {
|
||||
|
||||
@@ -359,10 +359,6 @@ public class SQLite implements DataSource {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void reload() {
|
||||
}
|
||||
|
||||
private void close(Statement st) {
|
||||
if (st != null) {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user