Class JEBackend

All Implemented Interfaces:
ConfigurationChangeListener<PluggableBackendCfg>, Backupable, HealthStatusProvider

public final class JEBackend extends BackendImpl<JeBackendCfg>
Class defined in the configuration for this backend type.
  • 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 class BackendImpl<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, or false 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 class BackendImpl<JeBackendCfg>
      Parameters:
      cfg - the configuration object
      serverContext - 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

      protected PluggableBackendMonitor 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 class BackendImpl<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

      public void afterRestore() throws InitializationException
      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

      public Path 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

      public BackupManager.CountedIterator<BackendFile> getBackendFiles() throws IOException
      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.