com.ca.jcs.enumeration
Class LookAheadRawNamingEnumeration<T>

java.lang.Object
  extended by com.ca.jcs.enumeration.RawNamingEnumeration<T>
      extended by com.ca.jcs.enumeration.LookAheadRawNamingEnumeration<T>
All Implemented Interfaces:
Enumeration<T>, NamingEnumeration<T>
Direct Known Subclasses:
ProcessingNamingEnumeration

public abstract class LookAheadRawNamingEnumeration<T>
extends RawNamingEnumeration<T>

Provides base class to be used in situations where the next enumeration result needs to pre-cached, usually because not all results are suitable to return to the client so that they need to be read and analyzed before deciding if they should be skipped.


Field Summary
protected  T lookAhead
           
protected  long skippedCount
           
 
Fields inherited from class com.ca.jcs.enumeration.RawNamingEnumeration
countLimit, scope, startTime, timeLimit, visitedCount
 
Constructor Summary
LookAheadRawNamingEnumeration(SearchControls searchControls)
          Create an enumeration respecting any time / size limits specified in searchControls.
 
Method Summary
 long getSkippedCount()
          Returns number of objects skipped by this enumeration.
 T rawNext()
          Return the current pre-cached value.
 String toString()
          Report number of visited and skipped objects for this enumeration.
 
Methods inherited from class com.ca.jcs.enumeration.RawNamingEnumeration
getCountLimit, getNonFatalException, getTimeLimit, getVisitedCount, hasMore, hasMoreElements, next, nextElement, rawHasMore, setCountLimit, setNonFatalException, setTimeLimit
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface javax.naming.NamingEnumeration
close
 

Field Detail

lookAhead

protected T lookAhead

skippedCount

protected long skippedCount
Constructor Detail

LookAheadRawNamingEnumeration

public LookAheadRawNamingEnumeration(SearchControls searchControls)
Create an enumeration respecting any time / size limits specified in searchControls.

Method Detail

getSkippedCount

public long getSkippedCount()
Returns number of objects skipped by this enumeration.


rawNext

public T rawNext()
          throws NamingException
Return the current pre-cached value.

Specified by:
rawNext in class RawNamingEnumeration<T>
Throws:
NamingException

toString

public String toString()
Report number of visited and skipped objects for this enumeration.

Overrides:
toString in class Object


Created 2011-07-14 13:27 EST