org.objectweb.medor.eval.cache.api
Interface CollectionCache

All Known Implementing Classes:
TupleCache

public interface CollectionCache

This interface represents a cache for TupleCollection objets.


Method Summary
 boolean contains(int index)
          Does the cache contains Object ranked int of the associated Objects to be cached.
 void destroy()
          Reinitializes the internal structure of the cache.
 long getCapacity()
           
 Tuple getTuple(int tupleIndex)
           
 void initialize()
          Creates the internal structure of the cache.
 boolean isCanInsert()
          Are insertions possible (is policy dependent: example may require to free the cache before insertion).
 boolean putTuple(int indexTuple, Tuple t)
           
 void setCanInsert(boolean canInsert)
          This method allow stop or no inserting objetcs in the cache.
 java.util.Iterator tupleIndexIterator()
          Returns an iterator over the indexes of the Objects which are present in the cache.
 

Method Detail

isCanInsert

public boolean isCanInsert()
Are insertions possible (is policy dependent: example may require to free the cache before insertion).


setCanInsert

public void setCanInsert(boolean canInsert)
This method allow stop or no inserting objetcs in the cache.


getTuple

public Tuple getTuple(int tupleIndex)
               throws MedorException
Parameters:
tupleIndex - is the rank of the Object
Throws:
MedorException

putTuple

public boolean putTuple(int indexTuple,
                        Tuple t)
                 throws MedorException
Throws:
MedorException

contains

public boolean contains(int index)
Does the cache contains Object ranked int of the associated Objects to be cached.


getCapacity

public long getCapacity()

initialize

public void initialize()
Creates the internal structure of the cache.


tupleIndexIterator

public java.util.Iterator tupleIndexIterator()
Returns an iterator over the indexes of the Objects which are present in the cache.


destroy

public void destroy()
Reinitializes the internal structure of the cache.