Package org.opends.server.backends.jeb
Class JEBackend
java.lang.Object
org.opends.server.api.Backend<C>
org.opends.server.api.LocalBackend<C>
org.opends.server.backends.pluggable.BackendImpl<JeBackendCfg>
org.opends.server.backends.jeb.JEBackend
- All Implemented Interfaces:
ConfigurationChangeListener<PluggableBackendCfg>
,Backupable
,HealthStatusProvider
Class defined in the configuration for this backend type.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.opends.server.api.LocalBackend
LocalBackend.BackendOperation, LocalBackend.LDIFImportResult
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Performs any necessary processing after a backup is performed.void
Performs any necessary processing after a restore is performed.void
Performs any necessary processing before a backup is performed.void
Performs any necessary processing before a restore is performed.protected Storage
configureStorage
(JeBackendCfg cfg, ServerContext serverContext) Creates the storage engine which will be used by this pluggable backend.Returns an iterator that goes over all the backend files.Returns the directory containing all the backend files to be backed up.protected PluggableBackendMonitor
Returns the local backend monitor associated with this backend.boolean
isConfigurationAcceptable
(JeBackendCfg cfg, List<LocalizableMessage> unacceptableReasons, ServerContext serverContext) Indicates whether the provided configuration is acceptable for this backend.Methods inherited from class org.opends.server.backends.pluggable.BackendImpl
addEntry, applyConfigurationChange, clearBackend, closeBackend, configureBackend, deleteEntry, entryExists, exportLDIF, getBaseDNs, getEntry, getEntryCount, getHealthStatus, getNumberOfChildren, getNumberOfEntriesInBaseDN, getServerContext, getSupportedControls, hasSubordinates, importLDIF, isConfigurationChangeAcceptable, isIndexed, isIndexed, isPublicBackend, openBackend, rebuildBackend, renameEntry, replaceEntry, sampleEntries, search, supports, verifyBackend
Methods inherited from class org.opends.server.api.LocalBackend
deregisterBackendMonitor, deregisterPersistentSearch, finalizeBackend, getAndClearOfflineChanges, getPersistentSearches, getWritabilityMode, handleRequest, handlesEntry, handlesEntry, isIndexed, registerBackendMonitor, registerPersistentSearch, search, setWritabilityMode, supportsControl
Methods inherited from class org.opends.server.api.Backend
getBackendID, getSupportedFeatures, setBackendID, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.opends.server.backup.Backupable
getBackendID
-
Constructor Details
-
JEBackend
public JEBackend()
-
-
Method Details
-
isConfigurationAcceptable
public boolean isConfigurationAcceptable(JeBackendCfg cfg, List<LocalizableMessage> unacceptableReasons, ServerContext serverContext) Description copied from class:Backend
Indicates whether the provided configuration is acceptable for this backend. It should be possible to call this method on an uninitialized backend instance in order to determine whether the backend would be able to use the provided configuration.- Overrides:
isConfigurationAcceptable
in classBackendImpl<JeBackendCfg>
- Parameters:
cfg
- The backend configuration for which to make the determination.unacceptableReasons
- A list that may be used to hold the reasons that the provided configuration is not acceptable.serverContext
- this Directory Server instance's server context- Returns:
true
if the provided configuration is acceptable for this backend, orfalse
if not.
-
configureStorage
protected Storage configureStorage(JeBackendCfg cfg, ServerContext serverContext) throws ConfigException Description copied from class:BackendImpl
Creates the storage engine which will be used by this pluggable backend. Implementations should create and configure a new storage engine but not open it.- Specified by:
configureStorage
in classBackendImpl<JeBackendCfg>
- Parameters:
cfg
- the configuration objectserverContext
- this Directory Server instance's server context- Returns:
- The storage engine to be used by this pluggable backend.
- Throws:
ConfigException
- If there is an error in the configuration.
-
getLocalBackendMonitor
Description copied from class:LocalBackend
Returns the local backend monitor associated with this backend.Implementations may override this method in order to provide custom implementations.
- Specified by:
getLocalBackendMonitor
in classBackendImpl<JeBackendCfg>
- Returns:
- The local backend monitor associated with this backend.
-
beforeBackup
public void beforeBackup()Description copied from interface:Backupable
Performs any necessary processing before a backup is performed. For example, this can take a shared lock or flush out a memory cache to backend files or delete stale data files. -
afterBackup
public void afterBackup()Description copied from interface:Backupable
Performs any necessary processing after a backup is performed. This method is called even if backup has failed. For example, this can release a shared lock. -
beforeRestore
public void beforeRestore()Description copied from interface:Backupable
Performs any necessary processing before a restore is performed. For example, this can take an exclusive lock. -
afterRestore
Description copied from interface:Backupable
Performs any necessary processing after a restore is performed. This method is called even if restore has failed. For example, this can release an exclusive lock or load the restored files into memory.- Throws:
InitializationException
- If an error occurs.
-
getDirectory
Description copied from interface:Backupable
Returns the directory containing all the backend files to be backed up.- Returns:
- the directory containing all the backend files to be backed up.
-
getBackendFiles
Description copied from interface:Backupable
Returns an iterator that goes over all the backend files. The iterator may return deleted files, such files must be ignored during iteration.- Returns:
- A backend file iterator.
- Throws:
IOException
- If there is an error when trying to find the backend files.
-