Class SqlStorageSupplier<K,V>
- java.lang.Object
-
- me.hsgamer.topper.agent.storage.simple.supplier.SqlStorageSupplier<K,V>
-
- All Implemented Interfaces:
DataStorageSupplier<K,V>
- Direct Known Subclasses:
MySqlStorageSupplier,SqliteStorageSupplier
public abstract class SqlStorageSupplier<K,V> extends Object implements DataStorageSupplier<K,V>
-
-
Field Summary
Fields Modifier and Type Field Description protected me.hsgamer.hscore.logger.common.Loggerlogger
-
Constructor Summary
Constructors Modifier Constructor Description protectedSqlStorageSupplier(SqlEntryConverter<K,V> converter)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract voidflushConnection(Connection connection)protected abstract ConnectiongetConnection()DataStorage<K,V>getStorage(String name)protected abstract StringtoSaveStatement(String name, String[] keyColumns, String[] valueColumns)protected abstract Object[]toSaveValues(Object[] keys, Object[] values)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface me.hsgamer.topper.agent.storage.simple.supplier.DataStorageSupplier
disable, enable
-
-
-
-
Constructor Detail
-
SqlStorageSupplier
protected SqlStorageSupplier(SqlEntryConverter<K,V> converter)
-
-
Method Detail
-
getConnection
protected abstract Connection getConnection() throws SQLException
- Throws:
SQLException
-
flushConnection
protected abstract void flushConnection(Connection connection)
-
toSaveStatement
@Language("SQL") protected abstract String toSaveStatement(String name, String[] keyColumns, String[] valueColumns)
-
getStorage
public DataStorage<K,V> getStorage(String name)
- Specified by:
getStoragein interfaceDataStorageSupplier<K,V>
-
-