public class QueueingSearchExecutor extends AbstractSearchExecutor
Modifier and Type | Class and Description |
---|---|
protected class |
QueueingSearchExecutor.AbstractHandler
Common implementation for the handler classes.
|
protected class |
QueueingSearchExecutor.IntermediateResponseHandler
Places intermediate responses on a blocking queue.
|
protected class |
QueueingSearchExecutor.SearchEntryHandler
Places search entries on a blocking queue.
|
static class |
QueueingSearchExecutor.SearchItem
Contains data returned when using the
QueueingSearchExecutor . |
protected class |
QueueingSearchExecutor.SearchReferenceHandler
Places search references on a blocking queue.
|
Modifier and Type | Field and Description |
---|---|
private int |
queueCapacity
Capacity of the blocking queue created by search operations.
|
logger
Constructor and Description |
---|
QueueingSearchExecutor()
Default constructor.
|
QueueingSearchExecutor(ExecutorService es)
Creates a new blocking search executor.
|
QueueingSearchExecutor(int capacity)
Creates a new blocking search executor.
|
QueueingSearchExecutor(int capacity,
ExecutorService es)
Creates a new blocking search executor.
|
Modifier and Type | Method and Description |
---|---|
protected void |
configureSearchRequest(SearchRequest request,
BlockingQueue<QueueingSearchExecutor.SearchItem> queue)
Sets the appropriate handlers on the supplied search request so that entries, references, and intermediate
responses are made available on the supplied queue.
|
protected Callable<Response<SearchResult>> |
createCallable(Connection conn,
SearchOperation operation,
SearchRequest request,
BlockingQueue<QueueingSearchExecutor.SearchItem> queue)
Returns a
Callable that executes the supplied request with the supplied operation in a try-finally block
that opens and closes the connection. |
BlockingQueue<QueueingSearchExecutor.SearchItem> |
search(ConnectionFactory factory)
Performs a search operation with the supplied connection factory.
|
BlockingQueue<QueueingSearchExecutor.SearchItem> |
search(ConnectionFactory factory,
SearchFilter filter)
Performs a search operation with the supplied connection factory.
|
BlockingQueue<QueueingSearchExecutor.SearchItem> |
search(ConnectionFactory factory,
SearchFilter filter,
String... attrs)
Performs a search operation with the supplied connection factory.
|
BlockingQueue<QueueingSearchExecutor.SearchItem> |
search(ConnectionFactory factory,
SearchFilter filter,
String[] attrs,
SearchEntryHandler... handlers)
Performs a search operation with the supplied connection factory.
|
BlockingQueue<QueueingSearchExecutor.SearchItem> |
search(ConnectionFactory factory,
String filter)
Performs a search operation with the supplied connection factory.
|
BlockingQueue<QueueingSearchExecutor.SearchItem> |
search(ConnectionFactory factory,
String filter,
String... attrs)
Performs a search operation with the supplied connection factory.
|
createSearchOperation, finalize, getExecutorService, getSearchCache, getSearchExceptionHandler, getSearchResponseHandlers, setSearchCache, setSearchExceptionHandler, setSearchResponseHandlers, shutdown, shutdownNow, toString
equals, getBaseDn, getBinaryAttributes, getDerefAliases, getReturnAttributes, getSearchEntryHandlers, getSearchFilter, getSearchReferenceHandlers, getSearchScope, getSizeLimit, getSortBehavior, getTimeLimit, getTypesOnly, hashCode, newObjectScopeSearchRequest, newObjectScopeSearchRequest, newObjectScopeSearchRequest, newSearchRequest, setBaseDn, setBinaryAttributes, setDerefAliases, setReturnAttributes, setSearchEntryHandlers, setSearchFilter, setSearchReferenceHandlers, setSearchScope, setSizeLimit, setSortBehavior, setTimeLimit, setTypesOnly
getControls, getIntermediateResponseHandlers, getReferralHandler, setControls, setIntermediateResponseHandlers, setReferralHandler
private final int queueCapacity
public QueueingSearchExecutor()
public QueueingSearchExecutor(int capacity)
capacity
- of the blocking queue returned from search operationspublic QueueingSearchExecutor(ExecutorService es)
es
- executor servicepublic QueueingSearchExecutor(int capacity, ExecutorService es)
capacity
- of the blocking queue returned from search operationses
- executor servicepublic BlockingQueue<QueueingSearchExecutor.SearchItem> search(ConnectionFactory factory) throws LdapException
factory
- to get a connection fromLdapException
- if the connection factory cannot create a connectionpublic BlockingQueue<QueueingSearchExecutor.SearchItem> search(ConnectionFactory factory, String filter) throws LdapException
factory
- to get a connection fromfilter
- to search withLdapException
- if the connection factory cannot create a connectionpublic BlockingQueue<QueueingSearchExecutor.SearchItem> search(ConnectionFactory factory, SearchFilter filter) throws LdapException
factory
- to get a connection fromfilter
- to search withLdapException
- if the connection factory cannot create a connectionpublic BlockingQueue<QueueingSearchExecutor.SearchItem> search(ConnectionFactory factory, String filter, String... attrs) throws LdapException
factory
- to get a connection fromfilter
- to search withattrs
- to returnLdapException
- if the connection factory cannot create a connectionpublic BlockingQueue<QueueingSearchExecutor.SearchItem> search(ConnectionFactory factory, SearchFilter filter, String... attrs) throws LdapException
factory
- to get a connection fromfilter
- to search withattrs
- to returnLdapException
- if the connection factory cannot create a connectionpublic BlockingQueue<QueueingSearchExecutor.SearchItem> search(ConnectionFactory factory, SearchFilter filter, String[] attrs, SearchEntryHandler... handlers) throws LdapException
factory
- to get a connection fromfilter
- to search withattrs
- to returnhandlers
- entry handlersLdapException
- if the connection factory cannot create a connectionprotected Callable<Response<SearchResult>> createCallable(Connection conn, SearchOperation operation, SearchRequest request, BlockingQueue<QueueingSearchExecutor.SearchItem> queue)
Callable
that executes the supplied request with the supplied operation in a try-finally block
that opens and closes the connection.conn
- connection that the operation will execute onoperation
- to executerequest
- to pass to the operationqueue
- to put search items onprotected void configureSearchRequest(SearchRequest request, BlockingQueue<QueueingSearchExecutor.SearchItem> queue)
request
- search request to modifyqueue
- to use in the handlersCopyright © 2003-2019 Virginia Tech. All Rights Reserved.