| | |
| | | import java.util.HashSet; |
| | | import java.util.Set; |
| | | import java.util.concurrent.locks.Lock; |
| | | import java.util.ArrayList; |
| | | import java.util.concurrent.atomic.AtomicLong; |
| | | |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.config.ConfigException; |
| | |
| | | import org.opends.server.types.LockManager; |
| | | import org.opends.server.types.SearchFilter; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import org.opends.server.types.Attribute; |
| | | import org.opends.server.admin.std.server.EntryCacheCfg; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | |
| | | // up. |
| | | private long lockTimeout = LockManager.DEFAULT_TIMEOUT; |
| | | |
| | | /** |
| | | * Arbitrary number of cache hits for monitoring. |
| | | */ |
| | | protected AtomicLong cacheHits = new AtomicLong(0); |
| | | |
| | | /** |
| | | * Arbitrary number of cache misses for monitoring. |
| | | */ |
| | | protected AtomicLong cacheMisses = new AtomicLong(0); |
| | | |
| | | |
| | | |
| | | /** |
| | |
| | | List<Lock> lockList) { |
| | | |
| | | if (!containsEntry(entryDN)) { |
| | | // Indicate cache miss. |
| | | cacheMisses.set(cacheMisses.incrementAndGet()); |
| | | |
| | | return null; |
| | | } |
| | | |
| | |
| | | // Translate given backend/entryID pair to entryDN. |
| | | DN entryDN = getEntryDN(backend, entryID); |
| | | if (entryDN == null) { |
| | | // Indicate cache miss. |
| | | cacheMisses.set(cacheMisses.incrementAndGet()); |
| | | |
| | | return null; |
| | | } |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * Retrieves a set of attributes containing monitor data that should |
| | | * be returned to the client if the corresponding monitor entry is |
| | | * requested. |
| | | * |
| | | * @return A set of attributes containing monitor data that should |
| | | * be returned to the client if the corresponding monitor |
| | | * entry is requested. |
| | | */ |
| | | public abstract ArrayList<Attribute> getMonitorData(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the maximum length of time in milliseconds to wait for |
| | | * a lock before giving up. |
| | | * |