| | |
| | | public void initializeEntryCache(ConfigEntry configEntry) |
| | | throws ConfigException, InitializationException |
| | | { |
| | | |
| | | dnMap.clear(); |
| | | idMap.clear(); |
| | | |
| | |
| | | */ |
| | | public void finalizeEntryCache() |
| | | { |
| | | |
| | | dnMap.clear(); |
| | | idMap.clear(); |
| | | } |
| | |
| | | */ |
| | | public boolean containsEntry(DN entryDN) |
| | | { |
| | | |
| | | // Indicate whether the DN map contains the specified DN. |
| | | return dnMap.containsKey(entryDN); |
| | | } |
| | |
| | | */ |
| | | public Entry getEntry(DN entryDN) |
| | | { |
| | | |
| | | SoftReference<CacheEntry> ref = dnMap.get(entryDN); |
| | | if (ref == null) |
| | | { |
| | |
| | | */ |
| | | public long getEntryID(DN entryDN) |
| | | { |
| | | |
| | | SoftReference<CacheEntry> ref = dnMap.get(entryDN); |
| | | if (ref == null) |
| | | { |
| | |
| | | public Entry getEntry(DN entryDN, LockType lockType, |
| | | List<Lock> lockList) |
| | | { |
| | | |
| | | SoftReference<CacheEntry> ref = dnMap.get(entryDN); |
| | | if (ref == null) |
| | | { |
| | |
| | | public Entry getEntry(Backend backend, long entryID, |
| | | LockType lockType, List<Lock> lockList) |
| | | { |
| | | |
| | | ConcurrentHashMap<Long,SoftReference<CacheEntry>> map = idMap.get(backend); |
| | | if (map == null) |
| | | { |
| | |
| | | */ |
| | | public void putEntry(Entry entry, Backend backend, long entryID) |
| | | { |
| | | |
| | | |
| | | // If there is a set of exclude filters, then make sure that the provided |
| | | // entry doesn't match any of them. |
| | | if (! excludeFilters.isEmpty()) |
| | |
| | | public boolean putEntryIfAbsent(Entry entry, Backend backend, |
| | | long entryID) |
| | | { |
| | | |
| | | |
| | | // If there is a set of exclude filters, then make sure that the provided |
| | | // entry doesn't match any of them. |
| | | if (! excludeFilters.isEmpty()) |
| | |
| | | */ |
| | | public void removeEntry(DN entryDN) |
| | | { |
| | | |
| | | |
| | | SoftReference<CacheEntry> ref = dnMap.remove(entryDN); |
| | | if (ref != null) |
| | | { |
| | |
| | | */ |
| | | public void clear() |
| | | { |
| | | |
| | | dnMap.clear(); |
| | | idMap.clear(); |
| | | } |
| | |
| | | */ |
| | | public void clearBackend(Backend backend) |
| | | { |
| | | |
| | | |
| | | // FIXME -- Would it be better just to dump everything? |
| | | ConcurrentHashMap<Long,SoftReference<CacheEntry>> map = |
| | | idMap.remove(backend); |
| | |
| | | */ |
| | | public void clearSubtree(DN baseDN) |
| | | { |
| | | |
| | | |
| | | // Determine the backend used to hold the specified base DN and clear it. |
| | | Backend backend = DirectoryServer.getBackend(baseDN); |
| | | if (backend == null) |
| | |
| | | */ |
| | | public void handleLowMemory() |
| | | { |
| | | |
| | | |
| | | // This function should automatically be taken care of by the nature of the |
| | | // soft references used in this cache. |
| | | // FIXME -- Do we need to do anything at all here? |
| | |
| | | */ |
| | | public DN getConfigurableComponentEntryDN() |
| | | { |
| | | |
| | | return configEntryDN; |
| | | } |
| | | |
| | |
| | | */ |
| | | public List<ConfigAttribute> getConfigurationAttributes() |
| | | { |
| | | |
| | | LinkedList<ConfigAttribute> attrList = new LinkedList<ConfigAttribute>(); |
| | | |
| | | |
| | |
| | | public boolean hasAcceptableConfiguration(ConfigEntry configEntry, |
| | | List<String> unacceptableReasons) |
| | | { |
| | | |
| | | |
| | | // Start out assuming that the configuration is valid. |
| | | boolean configIsAcceptable = true; |
| | | |
| | |
| | | public ConfigChangeResult applyNewConfiguration(ConfigEntry configEntry, |
| | | boolean detailedResults) |
| | | { |
| | | |
| | | |
| | | // Create a set of variables to use for the result. |
| | | ResultCode resultCode = ResultCode.SUCCESS; |
| | | boolean adminActionRequired = false; |