@ -18,6 +18,7 @@ package engine.workthreads;
@@ -18,6 +18,7 @@ package engine.workthreads;
import engine.Enum ;
import engine.db.archive.* ;
import engine.gameManager.ConfigManager ;
import engine.gameManager.DbManager ;
import org.pmw.tinylog.Logger ;
import java.sql.* ;
@ -153,7 +154,7 @@ public class WarehousePushThread implements Runnable {
@@ -153,7 +154,7 @@ public class WarehousePushThread implements Runnable {
public static boolean pushMineRecords ( ) {
try ( Connection localConnection = DataWarehouse . connectionPool . getConnection ( ) ;
try ( Connection localConnection = DbManager . getConnection ( ) ;
PreparedStatement statement = MineRecord . buildMineQueryStatement ( localConnection ) ;
ResultSet rs = statement . executeQuery ( ) ) {
@ -164,7 +165,7 @@ public class WarehousePushThread implements Runnable {
@@ -164,7 +165,7 @@ public class WarehousePushThread implements Runnable {
return true ;
} catch ( SQLException e ) {
Logger . error ( "Error with local DB connection: " + e . toString ( ) ) ;
Logger . error ( "Error with local DB connection: " + e . toString ( ) ) ;
e . printStackTrace ( ) ;
return false ;
}
@ -172,7 +173,7 @@ public class WarehousePushThread implements Runnable {
@@ -172,7 +173,7 @@ public class WarehousePushThread implements Runnable {
public static boolean pushCharacterRecords ( ) {
try ( Connection localConnection = DataWarehouse . connectionPool . getConnection ( ) ;
try ( Connection localConnection = DbManager . getConnection ( ) ;
PreparedStatement statement = CharacterRecord . buildCharacterQueryStatement ( localConnection ) ;
ResultSet rs = statement . executeQuery ( ) ) {
@ -183,7 +184,7 @@ public class WarehousePushThread implements Runnable {
@@ -183,7 +184,7 @@ public class WarehousePushThread implements Runnable {
return true ;
} catch ( SQLException e ) {
Logger . error ( "Error with local DB connection: " + e . toString ( ) ) ;
Logger . error ( "Error with local DB connection: " + e . toString ( ) ) ;
e . printStackTrace ( ) ;
return false ;
}
@ -191,7 +192,7 @@ public class WarehousePushThread implements Runnable {
@@ -191,7 +192,7 @@ public class WarehousePushThread implements Runnable {
private static boolean pushGuildRecords ( ) {
try ( Connection localConnection = DataWarehouse . connectionPool . getConnection ( ) ;
try ( Connection localConnection = DbManager . getConnection ( ) ;
PreparedStatement statement = GuildRecord . buildGuildQueryStatement ( localConnection ) ;
ResultSet rs = statement . executeQuery ( ) ) {
@ -238,7 +239,7 @@ public class WarehousePushThread implements Runnable {
@@ -238,7 +239,7 @@ public class WarehousePushThread implements Runnable {
private static boolean pushBaneRecords ( ) {
try ( Connection localConnection = DataWarehouse . connectionPool . getConnection ( ) ;
try ( Connection localConnection = DbManager . getConnection ( ) ;
PreparedStatement statement = BaneRecord . buildBaneQueryStatement ( localConnection ) ;
ResultSet rs = statement . executeQuery ( ) ) {
@ -271,7 +272,7 @@ public class WarehousePushThread implements Runnable {
@@ -271,7 +272,7 @@ public class WarehousePushThread implements Runnable {
private static boolean pushCityRecords ( ) {
try ( Connection localConnection = DataWarehouse . connectionPool . getConnection ( ) ;
try ( Connection localConnection = DbManager . getConnection ( ) ;
PreparedStatement statement = CityRecord . buildCityQueryStatement ( localConnection ) ;
ResultSet rs = statement . executeQuery ( ) ) {
@ -282,7 +283,7 @@ public class WarehousePushThread implements Runnable {
@@ -282,7 +283,7 @@ public class WarehousePushThread implements Runnable {
return true ;
} catch ( SQLException e ) {
Logger . error ( "Error with local DB connection: " + e . toString ( ) ) ;
Logger . error ( "Error with local DB connection: " + e . toString ( ) ) ;
e . printStackTrace ( ) ;
return false ;
}
@ -290,7 +291,7 @@ public class WarehousePushThread implements Runnable {
@@ -290,7 +291,7 @@ public class WarehousePushThread implements Runnable {
private static boolean pushPvpRecords ( ) {
try ( Connection localConnection = DataWarehouse . connectionPool . getConnection ( ) ;
try ( Connection localConnection = DbManager . getConnection ( ) ;
PreparedStatement statement = PvpRecord . buildPvpQueryStatement ( localConnection ) ;
ResultSet rs = statement . executeQuery ( ) ) {
@ -323,7 +324,7 @@ public class WarehousePushThread implements Runnable {
@@ -323,7 +324,7 @@ public class WarehousePushThread implements Runnable {
private static boolean pushRealmRecords ( ) {
try ( Connection localConnection = DataWarehouse . connectionPool . getConnection ( ) ;
try ( Connection localConnection = DbManager . getConnection ( ) ;
PreparedStatement statement = RealmRecord . buildRealmQueryStatement ( localConnection ) ;
ResultSet rs = statement . executeQuery ( ) ) {
@ -335,7 +336,7 @@ public class WarehousePushThread implements Runnable {
@@ -335,7 +336,7 @@ public class WarehousePushThread implements Runnable {
return true ;
} catch ( SQLException e ) {
Logger . error ( "Error with local DB connection: " + e . toString ( ) ) ;
Logger . error ( "Error with local DB connection: " + e . toString ( ) ) ;
e . printStackTrace ( ) ;
return false ;
}
@ -392,7 +393,7 @@ public class WarehousePushThread implements Runnable {
@@ -392,7 +393,7 @@ public class WarehousePushThread implements Runnable {
queryString = "SELECT * FROM `warehouse_index`" ;
try ( Connection localConnection = DataWarehouse . connectionPool . getConnection ( ) ;
try ( Connection localConnection = DbManager . getConnection ( ) ;
CallableStatement statement = localConnection . prepareCall ( queryString ) ;
ResultSet rs = statement . executeQuery ( ) ) {
@ -417,14 +418,14 @@ public class WarehousePushThread implements Runnable {
@@ -417,14 +418,14 @@ public class WarehousePushThread implements Runnable {
private static boolean updateWarehouseIndex ( ) {
try ( Connection connection = DataWarehouse . connectionPool . getConnection ( ) ;
try ( Connection connection = DbManager . getConnection ( ) ;
PreparedStatement statement = WarehousePushThread . buildIndexUpdateStatement ( connection ) ) {
statement . execute ( ) ;
return true ;
} catch ( SQLException e ) {
Logger . error ( e . toString ( ) ) ;
Logger . error ( e . toString ( ) ) ;
return false ;
}
}