com.waveset.adapter
Class BufferedAccountQueue

java.lang.Object
  extended bycom.waveset.adapter.BufferedAccountQueue
All Implemented Interfaces:
AccountIterator

public class BufferedAccountQueue
extends java.lang.Object
implements AccountIterator

An AccountIterator implemented using a DoubleBufferQueue. To use, a ResourceAdapter needs to implement a Supplier class.


Field Summary
static java.lang.String code_id
           
 
Constructor Summary
BufferedAccountQueue(Supplier supplier)
          Construct a look-ahead iterator using a DoubleBufferQueue and the specified supplier.
 
Method Summary
 void close()
           
protected  ObjectCache getCache()
           
 boolean hasNext()
           
 WSUser next()
           
protected  void setCache(ObjectCache cache)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

code_id

public static final java.lang.String code_id
See Also:
Constant Field Values
Constructor Detail

BufferedAccountQueue

public BufferedAccountQueue(Supplier supplier)
                     throws WavesetException
Construct a look-ahead iterator using a DoubleBufferQueue and the specified supplier.

Method Detail

setCache

protected void setCache(ObjectCache cache)

getCache

protected ObjectCache getCache()

hasNext

public boolean hasNext()
                throws WavesetException
Specified by:
hasNext in interface AccountIterator
Throws:
WavesetException

next

public WSUser next()
            throws java.util.NoSuchElementException,
                   WavesetException
Specified by:
next in interface AccountIterator
Returns:
the next account

Throws:
java.util.NoSuchElementException
WavesetException

close

public void close()
Specified by:
close in interface AccountIterator