org.objectweb.medor.eval.cache.api

Interface CollectionCache

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.
Iterator
tupleIndexIterator()
Returns an iterator over the indexes of the Objects which are present in the cache.

Method Details

contains

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


destroy

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


getCapacity

public long getCapacity()


getTuple

public Tuple getTuple(int tupleIndex)
            throws MedorException

Parameters:
tupleIndex - is the rank of the Object


initialize

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


isCanInsert

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


putTuple

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


setCanInsert

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


tupleIndexIterator

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