public class DerbyFileSystem extends DbFileSystem
DerbyFileSystem
is a JDBC-based FileSystem
implementation for Jackrabbit that persists file system entries in an
embedded Derby database.
It is configured through the following properties:
url
: the database url of the form
"jdbc:derby:[db];[attributes]"
schemaObjectPrefix
: prefix to be prepended to schema objectsdriver
: the FQN name of the JDBC driver class
(default: "org.apache.derby.jdbc.EmbeddedDriver"
)schema
: type of schema to be used
(default: "derby"
)user
: the database user (default: null
)password
: the user's password (default: null
)shutdownOnClose
: if true
(the default) the
database is shutdown when the last connection is closed;
set this to false
when using a standalone databaseDbFileSystem
.
The following is a fragment from a sample configuration:
<FileSystem class="org.apache.jackrabbit.core.fs.db.DerbyFileSystem"> <param name="url" value="jdbc:derby:${rep.home}/db;create=true"/> <param name="schemaObjectPrefix" value="rep_"/> </FileSystem>
Modifier and Type | Field and Description |
---|---|
protected boolean |
shutdownOnClose
Flag indicating whether this derby database should be shutdown on close.
|
dataSourceName, driver, password, url, user
conHelper, copyFileSQL, copyFilesSQL, deleteFileSQL, deleteFolderSQL, INITIAL_BUFFER_SIZE, initialized, insertFileSQL, insertFolderSQL, schema, schemaObjectPrefix, selectChildCountSQL, selectDataSQL, selectExistSQL, selectFileAndFolderNamesSQL, selectFileExistSQL, selectFileNamesSQL, selectFolderExistSQL, selectFolderNamesSQL, selectLastModifiedSQL, selectLengthSQL, updateDataSQL, updateLastModifiedSQL
SEPARATOR, SEPARATOR_CHAR
Constructor and Description |
---|
DerbyFileSystem()
Creates a new
DerbyFileSystem instance. |
Modifier and Type | Method and Description |
---|---|
void |
close()
Close the file system.
|
protected ConnectionHelper |
createConnectionHelper(DataSource dataSrc)
This method is called from the
DatabaseFileSystem.init() method of this class and returns a
ConnectionHelper instance which is assigned to the conHelper field. |
boolean |
getShutdownOnClose() |
void |
setShutdownOnClose(boolean shutdownOnClose) |
equals, getDataSource, getDataSourceName, getDriver, getPassword, getUrl, getUser, hashCode, setConnectionFactory, setDataSourceName, setDriver, setPassword, setUrl, setUser
buildSQLStatements, createCheckSchemaOperation, createDeepFolder, createFolder, deleteFile, deleteFolder, exists, getInputStream, getOutputStream, getSchema, getSchemaObjectPrefix, hasChildren, init, isFile, isFolder, isSchemaCheckEnabled, lastModified, length, list, listFiles, listFolders, setSchema, setSchemaCheckEnabled, setSchemaObjectPrefix, verifyRootExists
protected boolean shutdownOnClose
public boolean getShutdownOnClose()
public void setShutdownOnClose(boolean shutdownOnClose)
protected ConnectionHelper createConnectionHelper(DataSource dataSrc) throws Exception
DatabaseFileSystem.init()
method of this class and returns a
ConnectionHelper
instance which is assigned to the conHelper
field. Subclasses may
override it to return a specialized connection helper.createConnectionHelper
in class DatabaseFileSystem
dataSrc
- the DataSource
of this persistence managerConnectionHelper
Exception
- on errorpublic void close() throws FileSystemException
close
in interface FileSystem
close
in class DatabaseFileSystem
FileSystemException
Copyright © 2004–2024 The Apache Software Foundation. All rights reserved.