net.obsearch.storage.tc
Class AbstractTCOBStorage.ByteArrayKeyIterator

java.lang.Object
  extended by net.obsearch.storage.tc.AbstractTCOBStorage.CursorIterator<byte[]>
      extended by net.obsearch.storage.tc.AbstractTCOBStorage.ByteArrayKeyIterator
All Implemented Interfaces:
Iterator<byte[]>, CloseIterator<byte[]>
Enclosing class:
AbstractTCOBStorage<T extends Tuple>

protected class AbstractTCOBStorage.ByteArrayKeyIterator
extends AbstractTCOBStorage.CursorIterator<byte[]>


Field Summary
 
Fields inherited from class net.obsearch.storage.tc.AbstractTCOBStorage.CursorIterator
lastReturnedKey, nextKey, nextValue
 
Constructor Summary
protected AbstractTCOBStorage.ByteArrayKeyIterator()
           
 
Method Summary
protected  byte[] createTuple(byte[] key, byte[] value)
          Creates a tuple from the given key and value.
protected  void loadNext()
          Loads data from keyEntry and dataEntry and puts it into next.
 
Methods inherited from class net.obsearch.storage.tc.AbstractTCOBStorage.CursorIterator
closeCursor, createT, hasNext, next, remove
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractTCOBStorage.ByteArrayKeyIterator

protected AbstractTCOBStorage.ByteArrayKeyIterator()
                                            throws OBStorageException
Throws:
OBStorageException
Method Detail

createTuple

protected byte[] createTuple(byte[] key,
                             byte[] value)
Description copied from class: AbstractTCOBStorage.CursorIterator
Creates a tuple from the given key and value.

Specified by:
createTuple in class AbstractTCOBStorage.CursorIterator<byte[]>
Parameters:
key - raw key.
value - raw value.
Returns:
A new tuple of type T created from the raw data key and value.

loadNext

protected void loadNext()
                 throws NoSuchElementException
Description copied from class: AbstractTCOBStorage.CursorIterator
Loads data from keyEntry and dataEntry and puts it into next. If we go beyond max, we set next to null so that everybody will work properly.

Overrides:
loadNext in class AbstractTCOBStorage.CursorIterator<byte[]>
Throws:
NoSuchElementException


Copyright © 2007-2011 Arnoldo Jose Muller Molina. All Rights Reserved.