public class JDBCSequentialFileFactoryDriver extends AbstractJDBCDriver
| Modifier and Type | Field and Description |
|---|---|
protected PreparedStatement |
deleteFile |
connection, sqlProvider| Modifier and Type | Method and Description |
|---|---|
long |
calculateReadLength(long objectLength,
int bufferSpace,
long readPosition) |
void |
copyFileData(JDBCSequentialFile fileFrom,
JDBCSequentialFile fileTo)
Copy the data content of FileFrom to FileTo
|
void |
createFile(JDBCSequentialFile file)
Creates a new database row representing the supplied file.
|
protected void |
createSchema() |
void |
deleteFile(JDBCSequentialFile file)
Deletes the associated row in the database.
|
void |
destroy()
Drop all tables and data
|
int |
fileExists(JDBCSequentialFile file)
Checks to see if a file with filename and extension exists.
|
int |
getMaxSize() |
List<String> |
listFiles(String extension) |
void |
loadFile(JDBCSequentialFile file)
Loads an existing file.
|
void |
openFile(JDBCSequentialFile file)
Opens the supplied file.
|
protected void |
prepareStatements() |
int |
readFromFile(JDBCSequentialFile file,
ByteBuffer bytes)
Reads data from the file (at file.readPosition) into the byteBuffer.
|
void |
renameFile(JDBCSequentialFile file,
String newFileName)
Updates the fileName field to the new value.
|
int |
writeToFile(JDBCSequentialFile file,
byte[] data)
Persists data to this files associated database mapping.
|
connect, createTable, getConnection, setConnection, setDataSource, setJdbcConnectionUrl, setJdbcDriverClass, setSqlProvider, start, stopprotected PreparedStatement deleteFile
protected void createSchema()
throws SQLException
createSchema in class AbstractJDBCDriverSQLExceptionprotected void prepareStatements()
throws SQLException
prepareStatements in class AbstractJDBCDriverSQLExceptionpublic void openFile(JDBCSequentialFile file) throws SQLException
file - SQLExceptionpublic int fileExists(JDBCSequentialFile file) throws SQLException
file - SQLExceptionpublic void loadFile(JDBCSequentialFile file) throws SQLException
file - SQLExceptionpublic void createFile(JDBCSequentialFile file) throws SQLException
file - SQLExceptionpublic void renameFile(JDBCSequentialFile file, String newFileName) throws SQLException
file - newFileName - SQLExceptionpublic void deleteFile(JDBCSequentialFile file) throws SQLException
file - SQLExceptionpublic int writeToFile(JDBCSequentialFile file, byte[] data) throws SQLException
file - data - SQLExceptionpublic int readFromFile(JDBCSequentialFile file, ByteBuffer bytes) throws SQLException
file - bytes - SQLExceptionpublic void copyFileData(JDBCSequentialFile fileFrom, JDBCSequentialFile fileTo) throws SQLException
fileFrom - fileTo - SQLExceptionpublic void destroy()
throws SQLException
destroy in class AbstractJDBCDriverSQLExceptionpublic long calculateReadLength(long objectLength,
int bufferSpace,
long readPosition)
public int getMaxSize()
Copyright © 2016 The Apache Software Foundation. All Rights Reserved.