| | |
| | | */ |
| | | final class Context implements Closeable { |
| | | |
| | | /* |
| | | /** |
| | | * A cached read request - see cachedReads for more information. |
| | | */ |
| | | private static final class CachedRead implements SearchResultHandler, ResultHandler<Result> { |
| | |
| | | |
| | | } |
| | | |
| | | /* |
| | | /** |
| | | * An LRU cache of recent reads requests. This is used in order to reduce |
| | | * the number of repeated read operations performed when resolving DN |
| | | * references. |
| | |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public void close() { |
| | | connection.close(); |
| | |
| | | } |
| | | } |
| | | |
| | | /* |
| | | /** |
| | | * Adds read caching support to the provided connection as well |
| | | * functionality which automatically adds the proxied authorization control |
| | | * if needed. |
| | |
| | | connection.removeConnectionEventListener(listener); |
| | | } |
| | | |
| | | /* |
| | | * Try and re-use a cached result if possible. |
| | | */ |
| | | /** Try and re-use a cached result if possible. */ |
| | | @Override |
| | | public LdapPromise<Result> searchAsync(final SearchRequest request, |
| | | final IntermediateResponseHandler intermediateResponseHandler, final SearchResultHandler entryHandler) { |