Package org.apache.jackrabbit.core.data
Class AbstractBackend
- java.lang.Object
-
- org.apache.jackrabbit.core.data.AbstractBackend
-
- All Implemented Interfaces:
Backend
- Direct Known Subclasses:
FSBackend
,S3Backend
,VFSBackend
public abstract class AbstractBackend extends Object implements Backend
Abstract Backend which has a reference to the underlyingCachingDataStore
and is maintaining the lifecycle of the internal asynchronous write executor.
-
-
Constructor Summary
Constructors Constructor Description AbstractBackend()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Close backend and release resources like database connection if any.protected Executor
createAsyncWriteExecutor()
Creates anExecutor
.protected Executor
getAsyncWriteExecutor()
Returns Executor used to execute asynchronous write or touch jobs.int
getAsyncWritePoolSize()
Returns the pool size of the asynchronous write pool executor.protected String
getConfig()
Returns path of config property file.protected CachingDataStore
getDataStore()
Returns theCachingDataStore
instance using this backend.protected String
getHomeDir()
Returns path of repository home dir.void
init(CachingDataStore dataStore, String homeDir, String config)
This method initialize backend with the configuration.void
setAsyncWritePoolSize(int asyncWritePoolSize)
Sets the pool size of the asynchronous write pool executor.protected void
setConfig(String config)
Sets path of config property file.protected void
setDataStore(CachingDataStore dataStore)
Sets theCachingDataStore
instance using this backend.protected void
setHomeDir(String homeDir)
Sets path of repository home dir.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.jackrabbit.core.data.Backend
deleteAllOlderThan, deleteRecord, exists, exists, getAllIdentifiers, getLastModified, getLength, read, touch, touchAsync, write, writeAsync
-
-
-
-
Method Detail
-
getAsyncWritePoolSize
public int getAsyncWritePoolSize()
Returns the pool size of the asynchronous write pool executor.- Returns:
- the pool size of the asynchronous write pool executor
-
setAsyncWritePoolSize
public void setAsyncWritePoolSize(int asyncWritePoolSize)
Sets the pool size of the asynchronous write pool executor.- Parameters:
asyncWritePoolSize
- pool size of the async write pool executor
-
init
public void init(CachingDataStore dataStore, String homeDir, String config) throws DataStoreException
This method initialize backend with the configuration.- Specified by:
init
in interfaceBackend
- Parameters:
dataStore
-CachingDataStore
homeDir
- path of repository home dir.config
- path of config property file.- Throws:
DataStoreException
-
close
public void close() throws DataStoreException
Close backend and release resources like database connection if any.- Specified by:
close
in interfaceBackend
- Throws:
DataStoreException
-
getDataStore
protected CachingDataStore getDataStore()
Returns theCachingDataStore
instance using this backend.- Returns:
- the
CachingDataStore
instance using this backend
-
setDataStore
protected void setDataStore(CachingDataStore dataStore)
Sets theCachingDataStore
instance using this backend.- Parameters:
dataStore
- theCachingDataStore
instance using this backend
-
getHomeDir
protected String getHomeDir()
Returns path of repository home dir.- Returns:
- path of repository home dir
-
setHomeDir
protected void setHomeDir(String homeDir)
Sets path of repository home dir.- Parameters:
homeDir
- path of repository home dir
-
getConfig
protected String getConfig()
Returns path of config property file.- Returns:
- path of config property file
-
setConfig
protected void setConfig(String config)
Sets path of config property file.- Parameters:
config
- path of config property file
-
getAsyncWriteExecutor
protected Executor getAsyncWriteExecutor()
Returns Executor used to execute asynchronous write or touch jobs.- Returns:
- Executor used to execute asynchronous write or touch jobs
-
-