| | |
| | | /** |
| | | * A list of monitor providers created for this backend instance. |
| | | */ |
| | | private ArrayList<MonitorProvider> monitorProviders = |
| | | new ArrayList<MonitorProvider>(); |
| | | private ArrayList<MonitorProvider<?>> monitorProviders = |
| | | new ArrayList<MonitorProvider<?>>(); |
| | | |
| | | /** |
| | | * The base DNs defined for this backend instance. |
| | |
| | | */ |
| | | private static HashSet<String> supportedControls; |
| | | |
| | | /** |
| | | * The features supported by this backend. |
| | | */ |
| | | private static HashSet<String> supportedFeatures = new HashSet<String>(0); |
| | | |
| | | |
| | | |
| | | static |
| | | { |
| | | // Set our supported controls. |
| | |
| | | supportedControls.add(OID_VLV_REQUEST_CONTROL); |
| | | } |
| | | |
| | | /** |
| | | * The features supported by this backend. |
| | | */ |
| | | private static HashSet<String> supportedFeatures; |
| | | |
| | | static { |
| | | // Set our supported features. |
| | | supportedFeatures = new HashSet<String>(); |
| | | |
| | | //NYI |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | |
| | | */ |
| | | private long checksumDbEnv() { |
| | | |
| | | File backendDirectory = getFileForPath(cfg.getDBDirectory()); |
| | | File parentDirectory = getFileForPath(cfg.getDBDirectory()); |
| | | File backendDirectory = new File(parentDirectory, cfg.getBackendId()); |
| | | |
| | | List<File> jdbFiles = new ArrayList<File>(); |
| | | if(backendDirectory.isDirectory()) |
| | | { |
| | |
| | | } |
| | | |
| | | // Deregister our monitor providers. |
| | | for (MonitorProvider monitor : monitorProviders) |
| | | for (MonitorProvider<?> monitor : monitorProviders) |
| | | { |
| | | DirectoryServer.deregisterMonitorProvider( |
| | | monitor.getMonitorInstanceName().toLowerCase()); |
| | | } |
| | | monitorProviders = new ArrayList<MonitorProvider>(); |
| | | monitorProviders = new ArrayList<MonitorProvider<?>>(); |
| | | |
| | | // We presume the server will prevent more operations coming into this |
| | | // backend, but there may be existing operations already in the |
| | |
| | | @Override() |
| | | public HashSet<String> getSupportedFeatures() |
| | | { |
| | | return new HashSet<String>(); //NYI |
| | | return supportedFeatures; |
| | | } |
| | | |
| | | |
| | |
| | | // environment and re-open it. Only do this when we are |
| | | // importing to all the base DNs in the backend or if the backend only |
| | | // have one base DN. |
| | | |
| | | File backendDirectory = getFileForPath(cfg.getDBDirectory()); |
| | | File parentDirectory = getFileForPath(cfg.getDBDirectory()); |
| | | File backendDirectory = new File(parentDirectory, cfg.getBackendId()); |
| | | EnvManager.removeFiles(backendDirectory.getPath()); |
| | | envConfig.setReadOnly(false); |
| | | envConfig.setAllowCreate(true); |
| | |
| | | { |
| | | BackupManager backupManager = |
| | | new BackupManager(getBackendID()); |
| | | backupManager.createBackup(cfg, backupConfig); |
| | | File parentDir = getFileForPath(cfg.getDBDirectory()); |
| | | File backendDir = new File(parentDir, cfg.getBackendId()); |
| | | backupManager.createBackup(backendDir, backupConfig); |
| | | } |
| | | |
| | | |
| | |
| | | { |
| | | BackupManager backupManager = |
| | | new BackupManager(getBackendID()); |
| | | backupManager.restoreBackup(cfg, restoreConfig); |
| | | File parentDir = getFileForPath(cfg.getDBDirectory()); |
| | | File backendDir = new File(parentDir, cfg.getBackendId()); |
| | | backupManager.restoreBackup(backendDir, restoreConfig); |
| | | } |
| | | |
| | | |
| | |
| | | throws ConfigException, JebException |
| | | { |
| | | // Determine the backend database directory. |
| | | File backendDirectory = getFileForPath(cfg.getDBDirectory()); |
| | | File parentDirectory = getFileForPath(cfg.getDBDirectory()); |
| | | File backendDirectory = new File(parentDirectory, cfg.getBackendId()); |
| | | EnvManager.removeFiles(backendDirectory.getPath()); |
| | | } |
| | | |