|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.directory.server.core.filtering.BaseEntryFilteringCursor
public class BaseEntryFilteringCursor
A Cursor which uses a list of filters to selectively return entries and/or modify the contents of entries. Uses lazy pre-fetching on positioning operations which means adding filters after creation will not miss candidate entries.
| Constructor Summary | |
|---|---|
BaseEntryFilteringCursor(Cursor<ServerEntry> wrapped,
SearchingOperationContext operationContext)
Creates a new entry filtering Cursor over an existing Cursor using a no filter initially: more can be added later after creation. |
|
BaseEntryFilteringCursor(Cursor<ServerEntry> wrapped,
SearchingOperationContext operationContext,
EntryFilter filter)
Creates a new entry filtering Cursor over an existing Cursor using a single filter initially: more can be added later after creation. |
|
BaseEntryFilteringCursor(Cursor<ServerEntry> wrapped,
SearchingOperationContext operationContext,
java.util.List<EntryFilter> filters)
Creates a new entry filtering Cursor over an existing Cursor using a list of filters initially: more can be added later after creation. |
|
| Method Summary | |
|---|---|
boolean |
addEntryFilter(EntryFilter filter)
Adds an entry filter to this BaseEntryFilteringCursor at the very end of the filter list. |
void |
after(ClonedServerEntry element)
Prepares this Cursor, so a subsequent call to Cursor#previous() with a true return value, will have positioned the Cursor on a dataset element equal to or less than the element argument but not greater. |
void |
afterLast()
Positions this Curser after the last element. |
boolean |
available()
Determines whether or not a call to get() will succeed. |
void |
before(ClonedServerEntry element)
Prepares this Cursor, so a subsequent call to Cursor#next() with a true return value, will have positioned the Cursor on a dataset element equal to or less than the element argument but not greater. |
void |
beforeFirst()
Positions this Curser before the first element. |
void |
close()
Closes this Cursor and frees any resources it my have allocated. |
void |
close(java.lang.Exception reason)
Closes this Cursor and frees any resources it my have allocated. |
boolean |
first()
Positions this Curser at the first element. |
ClonedServerEntry |
get()
Gets the object at the current position. |
java.util.List<EntryFilter> |
getEntryFilters()
Gets an unmodifiable list of EntryFilters applied. |
SearchingOperationContext |
getOperationContext()
|
boolean |
isAbandoned()
Gets whether or not this BaseEntryFilteringCursor has been abandoned. |
boolean |
isClosed()
Checks if this Curser is closed. |
boolean |
isElementReused()
Gets whether or not this Cursor will return the same element object instance on get() operations for any position of this Cursor. |
java.util.Iterator<ClonedServerEntry> |
iterator()
|
boolean |
last()
Positions this Curser at the last element. |
boolean |
next()
Advances this Cursor to the next position. |
boolean |
previous()
Advances this Cursor to the previous position. |
boolean |
removeEntryFilter(EntryFilter filter)
Removes an entry filter to this BaseEntryFilteringCursor at the very end of the filter list. |
void |
setAbandoned(boolean abandoned)
Sets whether this BaseEntryFilteringCursor has been abandoned. |
void |
setClosureMonitor(ClosureMonitor monitor)
Sets a non-null closure monitor to associate with this Cursor. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BaseEntryFilteringCursor(Cursor<ServerEntry> wrapped,
SearchingOperationContext operationContext,
EntryFilter filter)
wrapped - the underlying wrapped Cursor whose entries are filteredsearchControls - the controls of search that created this Cursorinvocation - the search operation invocation creating this Cursorfilter - a single filter to be used
public BaseEntryFilteringCursor(Cursor<ServerEntry> wrapped,
SearchingOperationContext operationContext)
wrapped - the underlying wrapped Cursor whose entries are filteredsearchControls - the controls of search that created this Cursorinvocation - the search operation invocation creating this Cursorfilter - a single filter to be used
public BaseEntryFilteringCursor(Cursor<ServerEntry> wrapped,
SearchingOperationContext operationContext,
java.util.List<EntryFilter> filters)
wrapped - the underlying wrapped Cursor whose entries are filteredoperationContext - the operation context that created this Cursorinvocation - the search operation invocation creating this Cursorfilters - a list of filters to be used| Method Detail |
|---|
public boolean isAbandoned()
EntryFilteringCursor
isAbandoned in interface EntryFilteringCursorpublic void setAbandoned(boolean abandoned)
EntryFilteringCursor
setAbandoned in interface EntryFilteringCursorabandoned - true if abandoned, false if notpublic boolean addEntryFilter(EntryFilter filter)
EntryFilteringCursor
addEntryFilter in interface EntryFilteringCursorfilter - a filter to apply to the entries
List.add(Object)public boolean removeEntryFilter(EntryFilter filter)
EntryFilteringCursor
removeEntryFilter in interface EntryFilteringCursorfilter - a filter to remove from the filter list
List.remove(Object)public java.util.List<EntryFilter> getEntryFilters()
EntryFilteringCursor
getEntryFilters in interface EntryFilteringCursorpublic SearchingOperationContext getOperationContext()
getOperationContext in interface EntryFilteringCursor
public void after(ClonedServerEntry element)
throws java.lang.Exception
Cursor
after in interface Cursor<ClonedServerEntry>element - the element to be positioned after
java.lang.Exception - if there are problems positioning this cursor or if
this Cursor is closed
java.lang.UnsupportedOperationException - if this method is not supported
public void afterLast()
throws java.lang.Exception
Cursor
afterLast in interface Cursor<ClonedServerEntry>java.lang.Exception - if there are problems positioning this Cursor or if
this Cursor is closed
java.lang.UnsupportedOperationException - if this method is not supportedpublic boolean available()
Cursor
available in interface Cursor<ClonedServerEntry>
public void before(ClonedServerEntry element)
throws java.lang.Exception
Cursor
before in interface Cursor<ClonedServerEntry>element - the element to be positioned before
java.lang.Exception - with problems accessing the underlying btree
java.lang.UnsupportedOperationException - if this method is not supported
public void beforeFirst()
throws java.lang.Exception
Cursor
beforeFirst in interface Cursor<ClonedServerEntry>java.lang.Exception - if there are problems positioning this cursor or if
this Cursor is closed
java.lang.UnsupportedOperationException - if this method is not supported
public void close()
throws java.lang.Exception
Cursor
close in interface Cursor<ClonedServerEntry>java.lang.Exception - if for some reason this Cursor could not be closed
public void close(java.lang.Exception reason)
throws java.lang.Exception
Cursor
close in interface Cursor<ClonedServerEntry>reason - exception thrown when this Cursor is accessed after close
java.lang.Exception - if for some reason this Cursor could not be closedpublic final void setClosureMonitor(ClosureMonitor monitor)
Cursor
setClosureMonitor in interface Cursor<ClonedServerEntry>monitor - the monitor to use for detecting Cursor close events
public boolean first()
throws java.lang.Exception
Cursor
first in interface Cursor<ClonedServerEntry>java.lang.Exception - if there are problems positioning this Cursor or if
this Cursor is closed
java.lang.UnsupportedOperationException - if this method is not supported
public ClonedServerEntry get()
throws java.lang.Exception
Cursor
get in interface Cursor<ClonedServerEntry>java.lang.Exception - if the object at this Cursor's current position
cannot be retrieved, or if this Cursor is closed
public boolean isClosed()
throws java.lang.Exception
Cursor
isClosed in interface Cursor<ClonedServerEntry>java.lang.Exception - if there are problems determining the cursor's closed state
java.lang.UnsupportedOperationException - if this method is not supportedpublic boolean isElementReused()
Cursor
isElementReused in interface Cursor<ClonedServerEntry>
public boolean last()
throws java.lang.Exception
Cursor
last in interface Cursor<ClonedServerEntry>java.lang.Exception - if there are problems positioning this Cursor or if
this Cursor is closed
java.lang.UnsupportedOperationException - if this method is not supported
public boolean next()
throws java.lang.Exception
Cursor
next in interface Cursor<ClonedServerEntry>java.lang.Exception - if there are problems advancing to this Cursor to
the next position, or if this Cursor is closed
java.lang.UnsupportedOperationException - if this method is not supported
public boolean previous()
throws java.lang.Exception
Cursor
previous in interface Cursor<ClonedServerEntry>java.lang.Exception - if there are problems advancing to the next position
java.lang.UnsupportedOperationException - if this method is not supportedpublic java.util.Iterator<ClonedServerEntry> iterator()
iterator in interface java.lang.Iterable<ClonedServerEntry>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||