Class PostgresSequentialSequentialFileDriver
- java.lang.Object
-
- org.apache.activemq.artemis.jdbc.store.drivers.AbstractJDBCDriver
-
- org.apache.activemq.artemis.jdbc.store.file.JDBCSequentialFileFactoryDriver
-
- org.apache.activemq.artemis.jdbc.store.file.PostgresSequentialSequentialFileDriver
-
public final class PostgresSequentialSequentialFileDriver extends JDBCSequentialFileFactoryDriver
-
-
Field Summary
-
Fields inherited from class org.apache.activemq.artemis.jdbc.store.file.JDBCSequentialFileFactoryDriver
appendToLargeObject, appendToLargeObjectResultSetConcurrency, appendToLargeObjectResultSetType, copyFileRecord, createFile, createFileAutogeneratedKeys, createFileColumnNames, deleteFile, readLargeObject, renameFile, selectFileByFileName, selectFileNamesByExtension
-
Fields inherited from class org.apache.activemq.artemis.jdbc.store.drivers.AbstractJDBCDriver
connectionProvider, sqlProvider
-
-
Constructor Summary
Constructors Constructor Description PostgresSequentialSequentialFileDriver()PostgresSequentialSequentialFileDriver(JDBCConnectionProvider connectionProvider, SQLProvider provider)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcreateFile(JDBCSequentialFile file)Creates a new database row representing the supplied file.voidloadFile(JDBCSequentialFile file)Loads an existing file.protected voidprepareStatements()intreadFromFile(JDBCSequentialFile file, ByteBuffer bytes)Reads data from the file (at file.readPosition) into the byteBuffer.intwriteToFile(JDBCSequentialFile file, byte[] data, boolean append)Persists data to this files associated database mapping.-
Methods inherited from class org.apache.activemq.artemis.jdbc.store.file.JDBCSequentialFileFactoryDriver
calculateReadLength, copyFileData, createSchema, deleteFile, destroy, getFileID, getMaxSize, listFiles, openFile, renameFile
-
Methods inherited from class org.apache.activemq.artemis.jdbc.store.drivers.AbstractJDBCDriver
createTable, getJdbcConnectionProvider, getSqlProvider, setJdbcConnectionProvider, setSqlProvider, start, stop
-
-
-
-
Constructor Detail
-
PostgresSequentialSequentialFileDriver
public PostgresSequentialSequentialFileDriver() throws SQLException- Throws:
SQLException
-
PostgresSequentialSequentialFileDriver
public PostgresSequentialSequentialFileDriver(JDBCConnectionProvider connectionProvider, SQLProvider provider)
-
-
Method Detail
-
prepareStatements
protected void prepareStatements()
- Overrides:
prepareStatementsin classJDBCSequentialFileFactoryDriver
-
createFile
public void createFile(JDBCSequentialFile file) throws SQLException
Description copied from class:JDBCSequentialFileFactoryDriverCreates a new database row representing the supplied file.- Overrides:
createFilein classJDBCSequentialFileFactoryDriver- Throws:
SQLException
-
loadFile
public void loadFile(JDBCSequentialFile file) throws SQLException
Description copied from class:JDBCSequentialFileFactoryDriverLoads an existing file.- Overrides:
loadFilein classJDBCSequentialFileFactoryDriver- Throws:
SQLException
-
writeToFile
public int writeToFile(JDBCSequentialFile file, byte[] data, boolean append) throws SQLException
Description copied from class:JDBCSequentialFileFactoryDriverPersists data to this files associated database mapping.- Overrides:
writeToFilein classJDBCSequentialFileFactoryDriver- Returns:
- Throws:
SQLException
-
readFromFile
public int readFromFile(JDBCSequentialFile file, ByteBuffer bytes) throws SQLException
Description copied from class:JDBCSequentialFileFactoryDriverReads data from the file (at file.readPosition) into the byteBuffer.- Overrides:
readFromFilein classJDBCSequentialFileFactoryDriver- Returns:
- Throws:
SQLException
-
-