mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

abobrov
04.01.2007 d7983b7e6eef579bc5f86cefa6932fecc7aec7bd
opends/src/server/org/opends/server/extensions/SoftReferenceEntryCache.java
@@ -34,7 +34,6 @@
import java.util.ArrayList;
import java.util.HashSet;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.concurrent.ConcurrentHashMap;
import org.opends.messages.MessageBuilder;
@@ -80,13 +79,6 @@
   */
  private static final DebugTracer TRACER = getTracer();
  // The set of time units that will be used for expressing the task retention
  // time.
  private static final LinkedHashMap<String,Double> timeUnits =
       new LinkedHashMap<String,Double>();
  // The mapping between entry DNs and their corresponding entries.
  private ConcurrentHashMap<DN,SoftReference<CacheEntry>> dnMap;
@@ -94,9 +86,6 @@
  private ConcurrentHashMap<Backend,
               ConcurrentHashMap<Long,SoftReference<CacheEntry>>> idMap;
  // The DN of the configuration entry for this entry cache implementation.
  private DN configEntryDN;
  // The reference queue that will be used to notify us whenever a soft
  // reference is freed.
  private ReferenceQueue<CacheEntry> referenceQueue;
@@ -110,16 +99,6 @@
  static
  {
    timeUnits.put(TIME_UNIT_MILLISECONDS_ABBR, 1D);
    timeUnits.put(TIME_UNIT_MILLISECONDS_FULL, 1D);
    timeUnits.put(TIME_UNIT_SECONDS_ABBR, 1000D);
    timeUnits.put(TIME_UNIT_SECONDS_FULL, 1000D);
  }
  /**
   * Creates a new instance of this soft reference entry cache.  All
   * initialization should be performed in the <CODE>initializeEntryCache</CODE>
@@ -156,7 +135,6 @@
  {
    registeredConfiguration = configuration;
    configuration.addSoftReferenceChangeListener (this);
    configEntryDN = configuration.dn();
    dnMap.clear();
    idMap.clear();
@@ -580,34 +558,17 @@
    switch (errorHandler.getConfigPhase())
    {
    case PHASE_INIT:
    case PHASE_ACCEPTABLE:
    case PHASE_APPLY:
      newIncludeFilters = EntryCacheCommon.getFilters (
          configuration.getIncludeFilter(),
          ERR_SOFTREFCACHE_INVALID_INCLUDE_FILTER,
          WARN_SOFTREFCACHE_CANNOT_DECODE_ANY_INCLUDE_FILTERS,
          ERR_CACHE_INVALID_INCLUDE_FILTER,
          errorHandler,
          newConfigEntryDN
          );
      newExcludeFilters = EntryCacheCommon.getFilters (
          configuration.getExcludeFilter(),
          WARN_SOFTREFCACHE_CANNOT_DECODE_EXCLUDE_FILTER,
          WARN_SOFTREFCACHE_CANNOT_DECODE_ANY_EXCLUDE_FILTERS,
          errorHandler,
          newConfigEntryDN
          );
      break;
    case PHASE_ACCEPTABLE:  // acceptable and apply are using the same
    case PHASE_APPLY:       // error ID codes
      newIncludeFilters = EntryCacheCommon.getFilters (
          configuration.getIncludeFilter(),
          ERR_SOFTREFCACHE_INVALID_INCLUDE_FILTER,
          null,
          errorHandler,
          newConfigEntryDN
          );
      newExcludeFilters = EntryCacheCommon.getFilters (
          configuration.getExcludeFilter(),
          ERR_SOFTREFCACHE_INVALID_EXCLUDE_FILTER,
          null,
          ERR_CACHE_INVALID_EXCLUDE_FILTER,
          errorHandler,
          newConfigEntryDN
          );
@@ -616,8 +577,6 @@
    if (applyChanges && errorHandler.getIsAcceptable())
    {
      configEntryDN = newConfigEntryDN;
      setLockTimeout(newLockTimeout);
      setIncludeFilters(newIncludeFilters);
      setExcludeFilters(newExcludeFilters);