public interface Cache<T> extends StorageManager
BufferManager| Modifier and Type | Method and Description |
|---|---|
boolean |
add(CacheEntry entry,
Serializer<?> s)
Adds an entry to the cache.
|
boolean |
addToCacheGroup(Long gid,
Long oid)
Must be called prior to adding an entry
|
void |
createCacheGroup(Long gid)
Must be called prior to adding any group entries
|
CacheEntry |
get(T lock,
Long oid,
WeakReference<? extends Serializer<?>> ref)
Get method, must be called using the object obtained in the
lockForLoad method
|
int |
getCacheGroupCount() |
long |
getMemoryBufferSpace() |
T |
lockForLoad(Long oid,
Serializer<?> serializer)
Lock the object for load and return an identifier/lock
that can be used to retrieve the object.
|
Integer |
remove(Long gid,
Long id)
Remove an entry from the cache, return the sizeEstimate if the entry existed
|
Collection<Long> |
removeCacheGroup(Long gid)
Remove an entire cache group
TODO: this should use a callback on the buffermangaer to remove memory entries
without materializing all group keys
|
void |
shutdown() |
void |
unlockForLoad(T lock)
Must be called after lockForLoad
|
createFileStore, getMaxStorageSpace, initializevoid createCacheGroup(Long gid)
gid - Collection<Long> removeCacheGroup(Long gid)
gid - boolean addToCacheGroup(Long gid, Long oid)
gid - oid - T lockForLoad(Long oid, Serializer<?> serializer)
oid - serializer - void unlockForLoad(T lock)
CacheEntry get(T lock, Long oid, WeakReference<? extends Serializer<?>> ref) throws TeiidComponentException
TeiidComponentExceptionboolean add(CacheEntry entry, Serializer<?> s) throws Exception
entry - s - ExceptionInteger remove(Long gid, Long id)
gid - id - void shutdown()
long getMemoryBufferSpace()
int getCacheGroupCount()
Copyright © 2019. All rights reserved.