This commit is contained in:
Izzel_Aliz
2018-05-09 13:04:58 +08:00
parent 3f4940c6b7
commit 2b14457309
72 changed files with 1249 additions and 1318 deletions

View File

@@ -23,58 +23,6 @@ public class MySQLConnection {
private int recheck = 10;
private Thread recheckThread;
public String getUrl() {
return url;
}
public String getUser() {
return user;
}
public String getPort() {
return port;
}
public String getPassword() {
return password;
}
public String getDatabase() {
return database;
}
public String getConnectionUrl() {
return connectionUrl;
}
public Connection getConnection() {
return connection;
}
public Plugin getPlugin() {
return plugin;
}
public boolean isFallReconnection() {
return fallReconnection;
}
public void setPlugin(Plugin plugin) {
this.plugin = plugin;
}
public void setFallReconnection(boolean fallReconnection) {
this.fallReconnection = fallReconnection;
}
public int getRecheck() {
return recheck;
}
public Thread getRecheckThread() {
return recheckThread;
}
public MySQLConnection(String url, String user, String port, String password, String database) {
this(url, user, port, password, database, 10, Main.getInst());
}
@@ -126,14 +74,66 @@ public class MySQLConnection {
}
}
public void setReCheckSeconds(int s) {
this.recheck = s;
public String getUrl() {
return url;
}
public String getUser() {
return user;
}
public String getPort() {
return port;
}
public String getPassword() {
return password;
}
public String getDatabase() {
return database;
}
public String getConnectionUrl() {
return connectionUrl;
}
public Connection getConnection() {
return connection;
}
public Plugin getPlugin() {
return plugin;
}
public void setPlugin(Plugin plugin) {
this.plugin = plugin;
}
public boolean isFallReconnection() {
return fallReconnection;
}
public void setFallReconnection(boolean fallReconnection) {
this.fallReconnection = fallReconnection;
}
public int getRecheck() {
return recheck;
}
public Thread getRecheckThread() {
return recheckThread;
}
public int getReCheckSeconds() {
return recheck;
}
public void setReCheckSeconds(int s) {
this.recheck = s;
}
public boolean isConnection() {
try {
if (connection == null || connection.isClosed()) {