Modifier and Type | Field and Description |
---|---|
static int |
MAX_FILE_SIZE |
Constructor and Description |
---|
MemoryStorageManager() |
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
|
FileStore |
createFileStore(String name) |
CacheEntry |
get(Long lock,
Long oid,
WeakReference<? extends Serializer<?>> ref)
Get method, must be called using the object obtained in the
lockForLoad method
|
int |
getCacheGroupCount() |
int |
getCreated() |
long |
getMaxStorageSpace() |
long |
getMemoryBufferSpace() |
int |
getRemoved() |
void |
initialize() |
Long |
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(Long o)
Must be called after lockForLoad
|
public static final int MAX_FILE_SIZE
public void initialize()
initialize
in interface StorageManager
public FileStore createFileStore(String name)
createFileStore
in interface StorageManager
public int getCreated()
public int getRemoved()
public boolean add(CacheEntry entry, Serializer<?> s)
Cache
public boolean addToCacheGroup(Long gid, Long oid)
Cache
addToCacheGroup
in interface Cache<Long>
public void createCacheGroup(Long gid)
Cache
createCacheGroup
in interface Cache<Long>
public Long lockForLoad(Long oid, Serializer<?> serializer)
Cache
lockForLoad
in interface Cache<Long>
public void unlockForLoad(Long o)
Cache
unlockForLoad
in interface Cache<Long>
public CacheEntry get(Long lock, Long oid, WeakReference<? extends Serializer<?>> ref) throws TeiidComponentException
Cache
get
in interface Cache<Long>
TeiidComponentException
public Integer remove(Long gid, Long id)
Cache
public Collection<Long> removeCacheGroup(Long gid)
Cache
removeCacheGroup
in interface Cache<Long>
public long getMaxStorageSpace()
getMaxStorageSpace
in interface StorageManager
public long getMemoryBufferSpace()
getMemoryBufferSpace
in interface Cache<Long>
public int getCacheGroupCount()
getCacheGroupCount
in interface Cache<Long>
Copyright © 2019. All rights reserved.