|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.ca.jcs.enumeration.RawNamingEnumeration<T>
public abstract class RawNamingEnumeration<T>
A NamingEnumeration which counts the number of returned objects, and which enforces any optionally provided time / size limits.
| Field Summary | |
|---|---|
protected long |
countLimit
|
protected int |
scope
|
protected long |
startTime
|
protected long |
timeLimit
|
protected long |
visitedCount
|
| Constructor Summary | |
|---|---|
RawNamingEnumeration()
Create an enumeration around the provided queryResults, which were determined in a single bulk query. |
|
RawNamingEnumeration(long countLimit)
Create an enumeration using the provided and countLimit (0 means unlimited). |
|
RawNamingEnumeration(SearchControls searchControls)
Create an enumeration taking the time and count limits from the provided searchControls. |
|
| Method Summary | |
|---|---|
long |
getCountLimit()
Returns any configured size limit (0 means no limit is enforced). |
NamingException |
getNonFatalException()
|
long |
getTimeLimit()
Returns any configured time limit, in milliseconds (0 means no limit is enforced). |
long |
getVisitedCount()
|
boolean |
hasMore()
Returns true if rawHasMore() returns true, unless a time limit was configured and has been exhausted
in which case throws a LdapTimeLimitExceededException. |
boolean |
hasMoreElements()
Exception-free wrapper around hasMore(). |
T |
next()
Returns value returned by rawNext(), unless a size limit was configured and has been exceeded
in which case throws a LdapSizeLimitExceededException. |
T |
nextElement()
Exception-free wrapper around next(). |
abstract boolean |
rawHasMore()
Override this method to return whether more values remain to be returned. |
abstract T |
rawNext()
Override this method to return next value to be returned from next(). |
void |
setCountLimit(long countLimit)
|
void |
setNonFatalException(NamingException nonFatalException)
Allows an exception to be stored and thrown after all results have been returned. |
void |
setTimeLimit(long timeLimit)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface javax.naming.NamingEnumeration |
|---|
close |
| Field Detail |
|---|
protected long startTime
protected long timeLimit
protected long countLimit
protected int scope
protected long visitedCount
| Constructor Detail |
|---|
public RawNamingEnumeration(long countLimit)
RawNamingEnumeration(SearchControls) constructor is not an option.
public RawNamingEnumeration()
RawNamingEnumeration(SearchControls) constructor is not an option.
public RawNamingEnumeration(SearchControls searchControls)
| Method Detail |
|---|
public long getTimeLimit()
public void setTimeLimit(long timeLimit)
public long getCountLimit()
public void setCountLimit(long countLimit)
public long getVisitedCount()
public NamingException getNonFatalException()
public void setNonFatalException(NamingException nonFatalException)
public abstract boolean rawHasMore()
throws NamingException
NamingException
public abstract T rawNext()
throws NamingException
NamingException
public boolean hasMore()
throws NamingException
rawHasMore() returns true, unless a time limit was configured and has been exhausted
in which case throws a LdapTimeLimitExceededException.
hasMore in interface NamingEnumeration<T>NamingException
public final T next()
throws NamingException
rawNext(), unless a size limit was configured and has been exceeded
in which case throws a LdapSizeLimitExceededException. Also throws a NoSuchElementException
if hasMore() returns false.
next in interface NamingEnumeration<T>NamingExceptionpublic boolean hasMoreElements()
hasMore().
hasMoreElements in interface Enumeration<T>public T nextElement()
next().
nextElement in interface Enumeration<T>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||