org.openorb.pss.connector.memory
Class MemoryIterator

java.lang.Object
  extended by org.openorb.pss.connector.memory.MemoryIterator
All Implemented Interfaces:
Iterator

public class MemoryIterator
extends java.lang.Object
implements Iterator

A Memory iterator is an OpenORB extension to the Persistent State Service.

Author:
Jerome Daniel

Constructor Summary
MemoryIterator(StorageHomeBase home, MemoryCatalog catalog)
          Constructor
 
Method Summary
 StorageObject detach()
          Returns the current element and detached it from the iterator.
 StorageObject element()
          Returns the current element.
 void fetch(byte[] pid)
          Set the current element of the iterator by providing a PID
 boolean hasMoreElements()
          Returns true if there are some other elements
 void next()
          Shifts to the next element
 void reset()
          Resets the iterator to the first element
 void set(int position)
          Set the current position for the iterator
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MemoryIterator

public MemoryIterator(StorageHomeBase home,
                      MemoryCatalog catalog)
Constructor

Method Detail

hasMoreElements

public boolean hasMoreElements()
Returns true if there are some other elements

Specified by:
hasMoreElements in interface Iterator

next

public void next()
Shifts to the next element

Specified by:
next in interface Iterator

element

public StorageObject element()
Returns the current element. CAUTION : the element returned is always the same with a new identity ( the current storage type in the home ).

Specified by:
element in interface Iterator

detach

public StorageObject detach()
Returns the current element and detached it from the iterator.

Specified by:
detach in interface Iterator

reset

public void reset()
Resets the iterator to the first element

Specified by:
reset in interface Iterator

fetch

public void fetch(byte[] pid)
Set the current element of the iterator by providing a PID

Specified by:
fetch in interface Iterator

set

public void set(int position)
Set the current position for the iterator

Specified by:
set in interface Iterator