public abstract class AbstractBackend extends Object implements Backend
CachingDataStore and is
maintaining the lifecycle of the internal asynchronous write executor.| Constructor and Description |
|---|
AbstractBackend() |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close backend and release resources like database connection if any.
|
protected Executor |
createAsyncWriteExecutor()
Creates an
Executor. |
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 the
CachingDataStore 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 the
CachingDataStore instance using this backend. |
protected void |
setHomeDir(String homeDir)
Sets path of repository home dir.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdeleteAllOlderThan, deleteRecord, exists, exists, getAllIdentifiers, getLastModified, getLength, read, touch, touchAsync, write, writeAsyncpublic int getAsyncWritePoolSize()
public void setAsyncWritePoolSize(int asyncWritePoolSize)
asyncWritePoolSize - pool size of the async write pool executorpublic void init(CachingDataStore dataStore, String homeDir, String config) throws DataStoreException
init in interface BackenddataStore - CachingDataStorehomeDir - path of repository home dir.config - path of config property file.DataStoreExceptionpublic void close()
throws DataStoreException
close in interface BackendDataStoreExceptionprotected CachingDataStore getDataStore()
CachingDataStore instance using this backend.CachingDataStore instance using this backendprotected void setDataStore(CachingDataStore dataStore)
CachingDataStore instance using this backend.dataStore - the CachingDataStore instance using this backendprotected String getHomeDir()
protected void setHomeDir(String homeDir)
homeDir - path of repository home dirprotected String getConfig()
protected void setConfig(String config)
config - path of config property fileprotected Executor getAsyncWriteExecutor()
Copyright © 2004–2024 The Apache Software Foundation. All rights reserved.