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 underlyingCachingDataStoreand 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 voidclose()Close backend and release resources like database connection if any.protected ExecutorcreateAsyncWriteExecutor()Creates anExecutor.protected ExecutorgetAsyncWriteExecutor()Returns Executor used to execute asynchronous write or touch jobs.intgetAsyncWritePoolSize()Returns the pool size of the asynchronous write pool executor.protected StringgetConfig()Returns path of config property file.protected CachingDataStoregetDataStore()Returns theCachingDataStoreinstance using this backend.protected StringgetHomeDir()Returns path of repository home dir.voidinit(CachingDataStore dataStore, String homeDir, String config)This method initialize backend with the configuration.voidsetAsyncWritePoolSize(int asyncWritePoolSize)Sets the pool size of the asynchronous write pool executor.protected voidsetConfig(String config)Sets path of config property file.protected voidsetDataStore(CachingDataStore dataStore)Sets theCachingDataStoreinstance using this backend.protected voidsetHomeDir(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:
 initin interfaceBackend- Parameters:
 dataStore-CachingDataStorehomeDir- path of repository home dir.config- path of config property file.- Throws:
 DataStoreException
 
- 
close
public void close() throws DataStoreExceptionClose backend and release resources like database connection if any.- Specified by:
 closein interfaceBackend- Throws:
 DataStoreException
 
- 
getDataStore
protected CachingDataStore getDataStore()
Returns theCachingDataStoreinstance using this backend.- Returns:
 - the 
CachingDataStoreinstance using this backend 
 
- 
setDataStore
protected void setDataStore(CachingDataStore dataStore)
Sets theCachingDataStoreinstance using this backend.- Parameters:
 dataStore- theCachingDataStoreinstance 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
 
 
 - 
 
 -