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.Logger
logger
-
Constructor Summary
Constructors Modifier Constructor Description protected
SqlStorageSupplier(SqlEntryConverter<K,V> converter)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract void
flushConnection(Connection connection)
protected abstract Connection
getConnection()
DataStorage<K,V>
getStorage(String name)
protected abstract String
toSaveStatement(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:
getStorage
in interfaceDataStorageSupplier<K,V>
-
-