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

Jean-Noël Rouvignac
20.42.2016 61b9eb1be03fc03a9f4bb0013a08ff44a1059503
opendj-server-legacy/src/main/java/org/opends/server/extensions/SoftReferenceEntryCache.java
@@ -67,10 +67,7 @@
  /** The mapping between backend+ID and their corresponding entries. */
  private ConcurrentMap<String, ConcurrentMap<Long, Reference<CacheEntry>>> idMap;
  /**
   * The reference queue that will be used to notify us whenever a soft
   * reference is freed.
   */
  /** The reference queue that will be used to notify us whenever a soft reference is freed. */
  private ReferenceQueue<CacheEntry> referenceQueue;
  /** Currently registered configuration object. */
@@ -79,8 +76,6 @@
  private Thread cleanerThread;
  private volatile boolean shutdown;
  /**
   * Creates a new instance of this soft reference entry cache.  All
   * initialization should be performed in the <CODE>initializeEntryCache</CODE>
@@ -98,7 +93,6 @@
    referenceQueue = new ReferenceQueue<>();
  }
  /** {@inheritDoc} */
  @Override
  public void initializeEntryCache(
      SoftReferenceEntryCacheCfg configuration
@@ -129,7 +123,6 @@
    }
  }
  /** {@inheritDoc} */
  @Override
  public synchronized void finalizeEntryCache()
  {
@@ -152,14 +145,12 @@
    }
  }
  /** {@inheritDoc} */
  @Override
  public boolean containsEntry(DN entryDN)
  {
    return entryDN != null && dnMap.containsKey(entryDN);
  }
  /** {@inheritDoc} */
  @Override
  public Entry getEntry(DN entryDN)
  {
@@ -182,7 +173,6 @@
    return cacheEntry.getEntry();
  }
  /** {@inheritDoc} */
  @Override
  public long getEntryID(DN entryDN)
  {
@@ -195,7 +185,6 @@
    return -1;
  }
  /** {@inheritDoc} */
  @Override
  public DN getEntryDN(String backendID, long entryID)
  {
@@ -213,7 +202,6 @@
    return null;
  }
  /** {@inheritDoc} */
  @Override
  public void putEntry(Entry entry, String backendID, long entryID)
  {
@@ -244,7 +232,6 @@
    }
  }
  /** {@inheritDoc} */
  @Override
  public boolean putEntryIfAbsent(Entry entry, String backendID, long entryID)
  {
@@ -254,7 +241,6 @@
      return false;
    }
    // Create the cache entry based on the provided information.
    CacheEntry cacheEntry = new CacheEntry(entry, backendID, entryID);
    Reference<CacheEntry> ref = new SoftReference<>(cacheEntry, referenceQueue);
@@ -276,7 +262,6 @@
    return true;
  }
  /** {@inheritDoc} */
  @Override
  public void removeEntry(DN entryDN)
  {
@@ -309,7 +294,6 @@
    }
  }
  /** {@inheritDoc} */
  @Override
  public void clear()
  {
@@ -317,7 +301,6 @@
    idMap.clear();
  }
  /** {@inheritDoc} */
  @Override
  public void clearBackend(String backendID)
  {
@@ -340,7 +323,6 @@
    }
  }
  /** {@inheritDoc} */
  @Override
  public void clearSubtree(DN baseDN)
  {
@@ -356,7 +338,6 @@
    }
  }
  /** {@inheritDoc} */
  @Override
  public void handleLowMemory()
  {
@@ -365,7 +346,6 @@
    // FIXME -- Do we need to do anything at all here?
  }
  /** {@inheritDoc} */
  @Override
  public boolean isConfigurationAcceptable(EntryCacheCfg configuration,
                                           List<LocalizableMessage> unacceptableReasons)
@@ -375,7 +355,6 @@
    return isConfigurationChangeAcceptable(config, unacceptableReasons);
  }
  /** {@inheritDoc} */
  @Override
  public boolean isConfigurationChangeAcceptable(
      SoftReferenceEntryCacheCfg configuration,
@@ -393,7 +372,6 @@
    return errorHandler.getIsAcceptable();
  }
  /** {@inheritDoc} */
  @Override
  public ConfigChangeResult applyConfigurationChange(SoftReferenceEntryCacheCfg configuration)
  {
@@ -415,8 +393,6 @@
    return changeResult;
  }
  /**
   * Parses the provided configuration and configure the entry cache.
   *
@@ -555,7 +531,6 @@
    return Long.valueOf(dnMap.size());
  }
  /** {@inheritDoc} */
  @Override
  public String toVerboseString()
  {