| | |
| | | public void initializeEntryCache(ConfigEntry configEntry) |
| | | throws ConfigException, InitializationException |
| | | { |
| | | |
| | | configEntryDN = configEntry.getDN(); |
| | | |
| | | |
| | |
| | | */ |
| | | public void finalizeEntryCache() |
| | | { |
| | | |
| | | |
| | | // Release all memory currently in use by this cache. |
| | | cacheLock.lock(); |
| | | |
| | |
| | | */ |
| | | public boolean containsEntry(DN entryDN) |
| | | { |
| | | |
| | | // Indicate whether the DN map contains the specified DN. |
| | | return dnMap.containsKey(entryDN); |
| | | } |
| | |
| | | */ |
| | | public Entry getEntry(DN entryDN) |
| | | { |
| | | |
| | | |
| | | // Simply return the entry from the DN map. |
| | | CacheEntry e = dnMap.get(entryDN); |
| | | if (e == null) |
| | |
| | | */ |
| | | public long getEntryID(DN entryDN) |
| | | { |
| | | |
| | | // Simply return the ID from the DN map. |
| | | CacheEntry e = dnMap.get(entryDN); |
| | | if (e == null) |
| | |
| | | */ |
| | | public Entry getEntry(DN entryDN, LockType lockType, List<Lock> lockList) |
| | | { |
| | | |
| | | |
| | | // Get the entry from the DN map if it is present. If not, then return |
| | | // null. |
| | | CacheEntry entry = dnMap.get(entryDN); |
| | |
| | | public Entry getEntry(Backend backend, long entryID, LockType lockType, |
| | | List<Lock> lockList) |
| | | { |
| | | |
| | | // Get the hash map for the provided backend. If it isn't present, then |
| | | // return null. |
| | | HashMap<Long,CacheEntry> map = idMap.get(backend); |
| | |
| | | */ |
| | | 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) |
| | | { |
| | | |
| | | |
| | | // Acquire the lock on the cache. We should not return until the entry is |
| | | // removed, so we will block until we can obtain the lock. |
| | | // FIXME -- An alternate approach could be to block for a maximum length of |
| | |
| | | */ |
| | | public void clear() |
| | | { |
| | | |
| | | // Acquire a lock on the cache. We should not return until the cache has |
| | | // been cleared, so we will block until we can obtain the lock. |
| | | cacheLock.lock(); |
| | |
| | | */ |
| | | public void clearBackend(Backend backend) |
| | | { |
| | | |
| | | // Acquire a lock on the cache. We should not return until the cache has |
| | | // been cleared, so we will block until we can obtain the lock. |
| | | cacheLock.lock(); |
| | |
| | | */ |
| | | public void clearSubtree(DN baseDN) |
| | | { |
| | | |
| | | |
| | | // Determine which backend should be used for the provided base DN. If |
| | | // there is none, then we don't need to do anything. |
| | | Backend backend = DirectoryServer.getBackend(baseDN); |
| | |
| | | */ |
| | | private void clearSubtree(DN baseDN, Backend backend) |
| | | { |
| | | |
| | | |
| | | // See if there are any entries for the provided backend in the cache. If |
| | | // not, then return. |
| | | HashMap<Long,CacheEntry> map = idMap.get(backend); |
| | |
| | | */ |
| | | public void handleLowMemory() |
| | | { |
| | | |
| | | |
| | | // Grab the lock on the cache and wait until we have it. |
| | | cacheLock.lock(); |
| | | |
| | |
| | | */ |
| | | 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; |