| 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 |
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 StorageManagerpublic FileStore createFileStore(String name)
createFileStore in interface StorageManagerpublic int getCreated()
public int getRemoved()
public boolean add(CacheEntry entry, Serializer<?> s)
Cachepublic boolean addToCacheGroup(Long gid, Long oid)
CacheaddToCacheGroup in interface Cache<Long>public void createCacheGroup(Long gid)
CachecreateCacheGroup in interface Cache<Long>public Long lockForLoad(Long oid, Serializer<?> serializer)
CachelockForLoad in interface Cache<Long>public void unlockForLoad(Long o)
CacheunlockForLoad in interface Cache<Long>public CacheEntry get(Long lock, Long oid, WeakReference<? extends Serializer<?>> ref) throws TeiidComponentException
Cacheget in interface Cache<Long>TeiidComponentExceptionpublic Integer remove(Long gid, Long id)
Cachepublic Collection<Long> removeCacheGroup(Long gid)
CacheremoveCacheGroup in interface Cache<Long>public long getMaxStorageSpace()
getMaxStorageSpace in interface StorageManagerpublic long getMemoryBufferSpace()
getMemoryBufferSpace in interface Cache<Long>Copyright © 2018 JBoss by Red Hat. All rights reserved.