org.objectweb.medor.eval.prefetch.lib
Class PrefetchCacheImpl
java.lang.Object
org.objectweb.medor.eval.prefetch.lib.PrefetchCacheImpl
- PrefetchCache
public class PrefetchCacheImpl
extends java.lang.Object
- P. Dechamboux
PrefetchBuffer | createPrefetchBuffer(PrefetchBufferFactory pbf, Object cat, Object ctxt, int indexpos) - Allocates a prefetched buffer for the object category and the connection
context in order to register prefetched tuples.
|
PrefetchBuffer | createPrefetchBuffer(PrefetchBufferFactory pbf, Object cat, Object ctxt, int indexpos, boolean multithread) - Allocates a prefetched buffer for the object category and the connection
context in order to register prefetched tuples.
|
Logger | getLogger()
|
Tuple | getPrefetchTuple(Object index, Object cat, Object ctxt) - Retrieves the prefetched tuple from this cache associated with this
index information, within the given caching context.
|
void | invalidatePrefetchBuffer(Object ctxt) - Invalidates all the prefetched tuples that are associated with the given
caching connection context.
|
static String | printTuple(Tuple t)
|
void | setLogger(Logger logger)
|
PrefetchCacheImpl
public PrefetchCacheImpl()
PrefetchCacheImpl
public PrefetchCacheImpl(Logger logger)
createPrefetchBuffer
public PrefetchBuffer createPrefetchBuffer(PrefetchBufferFactory pbf,
Object cat,
Object ctxt,
int indexpos)
throws MedorException
Allocates a prefetched buffer for the object category and the connection
context in order to register prefetched tuples.
- createPrefetchBuffer in interface PrefetchCache
pbf
- The factory for creating actual PrefetchBuffercat
- The associated object category.ctxt
- The associated caching context.indexpos
- The position of the index field within the prefetched
tuples.
- The allocated PrefetchBuffer.
createPrefetchBuffer
public PrefetchBuffer createPrefetchBuffer(PrefetchBufferFactory pbf,
Object cat,
Object ctxt,
int indexpos,
boolean multithread)
throws MedorException
Allocates a prefetched buffer for the object category and the connection
context in order to register prefetched tuples.
- createPrefetchBuffer in interface PrefetchCache
pbf
- The factory for creating actual PrefetchBuffercat
- The associated object category.ctxt
- The associated caching context.indexpos
- The position of the index field within the prefetchedmultithread
- indicates if the context is used by several threads
- The allocated PrefetchBuffer.
getLogger
public Logger getLogger()
getPrefetchTuple
public Tuple getPrefetchTuple(Object index,
Object cat,
Object ctxt)
throws MedorException
Retrieves the prefetched tuple from this cache associated with this
index information, within the given caching context. The prefetched tuple
also belongs to the given object category.
- getPrefetchTuple in interface PrefetchCache
index
- The index that allows the yielded prefetched data item to be
identified into the cache.cat
- The category (e.g., class) to which the objects, that can be
built using the prefetched data, belong to.ctxt
- The caching context within which the data has been
prefetched.
- The prefetched tuple.
invalidatePrefetchBuffer
public void invalidatePrefetchBuffer(Object ctxt)
Invalidates all the prefetched tuples that are associated with the given
caching connection context.
- invalidatePrefetchBuffer in interface PrefetchCache
ctxt
- The invalid caching context.
printTuple
public static String printTuple(Tuple t)
setLogger
public void setLogger(Logger logger)