| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions copyright 2013 ForgeRock AS. |
| | | */ |
| | | package org.opends.server.core; |
| | | import org.opends.messages.Message; |
| | |
| | | EntryCacheMonitorProvider monitor = entryCache.getEntryCacheMonitor(); |
| | | if (monitor != null) |
| | | { |
| | | String instanceName = toLowerCase(monitor.getMonitorInstanceName()); |
| | | DirectoryServer.deregisterMonitorProvider(instanceName); |
| | | DirectoryServer.deregisterMonitorProvider(monitor); |
| | | monitor.finalizeMonitorProvider(); |
| | | entryCache.setEntryCacheMonitor(null); |
| | | } |
| | |
| | | EntryCacheMonitorProvider monitor = entryCache.getEntryCacheMonitor(); |
| | | if (monitor != null) |
| | | { |
| | | String instanceName = toLowerCase(monitor.getMonitorInstanceName()); |
| | | DirectoryServer.deregisterMonitorProvider(instanceName); |
| | | DirectoryServer.deregisterMonitorProvider(monitor); |
| | | monitor.finalizeMonitorProvider(); |
| | | entryCache.setEntryCacheMonitor(null); |
| | | } |
| | |
| | | ) |
| | | throws InitializationException |
| | | { |
| | | EntryCache entryCache = null; |
| | | EntryCache<?> entryCache = null; |
| | | |
| | | // If we this entry cache is already installed and active it |
| | | // should be present in the current cache order map, use it. |
| | |
| | | |
| | | try |
| | | { |
| | | EntryCacheCfgDefn definition; |
| | | ClassPropertyDefinition propertyDefinition; |
| | | Class<? extends EntryCache> cacheClass; |
| | | EntryCache<? extends EntryCacheCfg> cache; |
| | | |
| | | definition = EntryCacheCfgDefn.getInstance(); |
| | | propertyDefinition = definition.getJavaClassPropertyDefinition(); |
| | | cacheClass = propertyDefinition.loadClass(className, EntryCache.class); |
| | | EntryCacheCfgDefn definition = EntryCacheCfgDefn.getInstance(); |
| | | ClassPropertyDefinition propertyDefinition = definition |
| | | .getJavaClassPropertyDefinition(); |
| | | @SuppressWarnings("unchecked") |
| | | Class<? extends EntryCache<?>> cacheClass = |
| | | (Class<? extends EntryCache<?>>) propertyDefinition |
| | | .loadClass(className, EntryCache.class); |
| | | |
| | | // If there is some entry cache instance already initialized work with |
| | | // it instead of creating a new one unless explicit init is requested. |
| | | EntryCache<? extends EntryCacheCfg> cache; |
| | | if (initialize || (entryCache == null)) { |
| | | cache = (EntryCache<? extends EntryCacheCfg>) cacheClass.newInstance(); |
| | | } else { |