From 7ac1c33413475f903e58d98bf5f0cbacbad21e07 Mon Sep 17 00:00:00 2001
From: Matthew Swift <matthew.swift@forgerock.com>
Date: Fri, 27 Feb 2015 21:36:55 +0000
Subject: [PATCH] OPENDJ-1855: Reformat and cleanup pluggable backend code: adjust visibility, findbugs, ucdetector, etc.
---
opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/NullIndex.java | 89 ++++++++++----------------------------------
1 files changed, 20 insertions(+), 69 deletions(-)
diff --git a/opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/NullIndex.java b/opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/NullIndex.java
index 536d6f4..8e5c8b7 100644
--- a/opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/NullIndex.java
+++ b/opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/NullIndex.java
@@ -35,7 +35,6 @@
import org.opends.server.backends.pluggable.spi.StorageRuntimeException;
import org.opends.server.backends.pluggable.spi.TreeName;
import org.opends.server.backends.pluggable.spi.WriteableStorage;
-import org.opends.server.types.DirectoryException;
import org.opends.server.types.Entry;
import org.opends.server.types.Modification;
@@ -46,31 +45,12 @@
final class NullIndex extends Index
{
- /**
- * Create a new null index object.
- *
- * @param name
- * The name of the index database within the entryContainer.
- * @param indexer
- * The indexer object to construct index keys from LDAP attribute values.
- * @param state
- * The state database to persist index state info.
- * @param storage
- * The JE Storage
- * @param txn
- * The transaction to use when creating this object
- * @param entryContainer
- * The database entryContainer holding this index.
- * @throws StorageRuntimeException
- * If an error occurs in the JE database.
- */
- public NullIndex(TreeName name, Indexer indexer, State state, Storage storage, WriteableStorage txn,
+ NullIndex(TreeName name, Indexer indexer, State state, Storage storage, WriteableStorage txn,
EntryContainer entryContainer) throws StorageRuntimeException
{
super(name, indexer, state, 0, 0, false, storage, txn, entryContainer);
}
- /** {@inheritDoc} */
@Override
void updateKey(WriteableStorage txn, ByteString key, EntryIDSet deletedIDs, EntryIDSet addedIDs)
throws StorageRuntimeException
@@ -78,167 +58,138 @@
// Do nothing.
}
- /** {@inheritDoc} */
@Override
- public void delete(IndexBuffer buffer, ByteString keyBytes)
+ void delete(IndexBuffer buffer, ByteString keyBytes)
{
// Do nothing.
}
- /** {@inheritDoc} */
@Override
- public ConditionResult containsID(ReadableStorage txn, ByteString key, EntryID entryID)
+ ConditionResult containsID(ReadableStorage txn, ByteString key, EntryID entryID)
throws StorageRuntimeException
{
return ConditionResult.UNDEFINED;
}
- /** {@inheritDoc} */
@Override
- public EntryIDSet readKey(ByteSequence key, ReadableStorage txn)
+ EntryIDSet readKey(ByteSequence key, ReadableStorage txn)
{
return new EntryIDSet();
}
- /** {@inheritDoc} */
@Override
- public void writeKey(WriteableStorage txn, ByteString key, EntryIDSet entryIDList) throws StorageRuntimeException
- {
- // Do nothing.
- }
-
- /** {@inheritDoc} */
- @Override
- public EntryIDSet readRange(ReadableStorage txn, ByteSequence lower, ByteSequence upper, boolean lowerIncluded,
+ EntryIDSet readRange(ReadableStorage txn, ByteSequence lower, ByteSequence upper, boolean lowerIncluded,
boolean upperIncluded)
{
return new EntryIDSet();
}
- /** {@inheritDoc} */
@Override
- public int getEntryLimitExceededCount()
+ int getEntryLimitExceededCount()
{
return 0;
}
- /** {@inheritDoc} */
@Override
- public void addEntry(IndexBuffer buffer, EntryID entryID, Entry entry, IndexingOptions options)
- throws StorageRuntimeException, DirectoryException
+ void addEntry(IndexBuffer buffer, EntryID entryID, Entry entry, IndexingOptions options)
+ throws StorageRuntimeException
{
// Do nothing.
}
- /** {@inheritDoc} */
@Override
- public void removeEntry(IndexBuffer buffer, EntryID entryID, Entry entry, IndexingOptions options)
- throws StorageRuntimeException, DirectoryException
+ void removeEntry(IndexBuffer buffer, EntryID entryID, Entry entry, IndexingOptions options)
+ throws StorageRuntimeException
{
// Do nothing.
}
- /** {@inheritDoc} */
@Override
- public void modifyEntry(IndexBuffer buffer, EntryID entryID, Entry oldEntry, Entry newEntry, List<Modification> mods,
+ void modifyEntry(IndexBuffer buffer, EntryID entryID, Entry oldEntry, Entry newEntry, List<Modification> mods,
IndexingOptions options) throws StorageRuntimeException
{
// Do nothing.
}
- /** {@inheritDoc} */
@Override
- public boolean setIndexEntryLimit(int indexEntryLimit)
+ boolean setIndexEntryLimit(int indexEntryLimit)
{
return false;
}
- /** {@inheritDoc} */
@Override
- public int getIndexEntryLimit()
+ int getIndexEntryLimit()
{
return 0;
}
- /** {@inheritDoc} */
@Override
- public void setTrusted(WriteableStorage txn, boolean trusted) throws StorageRuntimeException
+ void setTrusted(WriteableStorage txn, boolean trusted) throws StorageRuntimeException
{
// Do nothing.
}
- /** {@inheritDoc} */
@Override
- public boolean isTrusted()
+ boolean isTrusted()
{
return true;
}
- /** {@inheritDoc} */
@Override
- public boolean isRebuildRunning()
+ boolean isRebuildRunning()
{
return false;
}
- /** {@inheritDoc} */
@Override
- public void setRebuildStatus(boolean rebuildRunning)
+ void setRebuildStatus(boolean rebuildRunning)
{
// Do nothing.
}
- /** {@inheritDoc} */
@Override
- public boolean getMaintainCount()
+ boolean getMaintainCount()
{
return false;
}
- /** {@inheritDoc} */
@Override
- public void open(WriteableStorage txn) throws StorageRuntimeException
+ void open(WriteableStorage txn) throws StorageRuntimeException
{
// Do nothing.
}
- /** {@inheritDoc} */
@Override
public void close() throws StorageRuntimeException
{
// Do nothing.
}
- /** {@inheritDoc} */
@Override
void put(WriteableStorage txn, ByteSequence key, ByteSequence value) throws StorageRuntimeException
{
}
- /** {@inheritDoc} */
@Override
ByteString read(ReadableStorage txn, ByteSequence key, boolean isRMW) throws StorageRuntimeException
{
return null;
}
- /** {@inheritDoc} */
@Override
boolean insert(WriteableStorage txn, ByteString key, ByteString value) throws StorageRuntimeException
{
return true;
}
- /** {@inheritDoc} */
@Override
boolean delete(WriteableStorage txn, ByteSequence key) throws StorageRuntimeException
{
return true;
}
- /** {@inheritDoc} */
@Override
- public long getRecordCount(ReadableStorage txn) throws StorageRuntimeException
+ long getRecordCount(ReadableStorage txn) throws StorageRuntimeException
{
return 0;
}
--
Gitblit v1.10.0