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

Jean-Noel Rouvignac
27.00.2015 061cfa8f64566b1a8661fd4bc2df87dfcaa41866
opendj3-server-dev/src/server/org/opends/server/backends/pluggable/AttributeIndex.java
@@ -27,6 +27,10 @@
 */
package org.opends.server.backends.pluggable;
import static org.opends.messages.JebMessages.*;
import static org.opends.server.util.ServerConstants.*;
import static org.opends.server.util.StaticUtils.*;
import java.io.Closeable;
import java.util.*;
@@ -53,10 +57,6 @@
import org.opends.server.types.*;
import org.opends.server.util.StaticUtils;
import static org.opends.messages.JebMessages.*;
import static org.opends.server.util.ServerConstants.*;
import static org.opends.server.util.StaticUtils.*;
/**
 * Class representing an attribute index.
 * We have a separate database for each type of indexing, which makes it easy
@@ -131,9 +131,11 @@
   *
   * @param indexConfig The attribute index configuration.
   * @param entryContainer The entryContainer of this attribute index.
   * @param txn The database transaction
   * @throws ConfigException if a configuration related error occurs.
   */
  public AttributeIndex(BackendIndexCfg indexConfig, EntryContainer entryContainer, WriteableStorage txn) throws ConfigException
  public AttributeIndex(BackendIndexCfg indexConfig, EntryContainer entryContainer, WriteableStorage txn)
      throws ConfigException
  {
    this.entryContainer = entryContainer;
    this.indexConfig = indexConfig;
@@ -258,6 +260,7 @@
  /**
   * Open the attribute index.
   *
   * @param txn The database transaction
   * @throws StorageRuntimeException if a JE database error occurs while
   * opening the index.
   */
@@ -643,7 +646,7 @@
    final ConfigChangeResult ccr = new ConfigChangeResult();
    try
    {
      entryContainer.getStorage().write(new WriteOperation()
      entryContainer.getRootContainer().getStorage().write(new WriteOperation()
      {
        @Override
        public void run(WriteableStorage txn) throws Exception
@@ -776,7 +779,8 @@
    return rules;
  }
  private void applyChangeToIndex(WriteableStorage txn, IndexType indexType, BackendIndexCfg cfg, ConfigChangeResult ccr)
  private void applyChangeToIndex(final WriteableStorage txn, final IndexType indexType, final BackendIndexCfg cfg,
      final ConfigChangeResult ccr)
  {
    String indexId = indexType.toString();
    Index index = nameToIndexes.get(indexId);