public class CacheManagerWithShadowCache extends java.lang.Object implements CacheManager
| Modifier and Type | Class and Description |
|---|---|
static class |
CacheManagerWithShadowCache.PageIdFunnel
Funnel for PageId.
|
CacheManager.Factory, CacheManager.State| Constructor and Description |
|---|
CacheManagerWithShadowCache(CacheManager cacheManager,
AlluxioConfiguration conf) |
| Modifier and Type | Method and Description |
|---|---|
void |
aging()
Decrease each item's clock and clean stale items.
|
boolean |
append(PageId pageId,
int appendAt,
byte[] page,
CacheContext cacheContext) |
void |
close() |
boolean |
delete(PageId pageId)
Deletes a page from the cache.
|
int |
get(PageId pageId,
int pageOffset,
int bytesToRead,
PageReadTargetBuffer target,
CacheContext cacheContext)
Reads a part of a page if the queried page is found in the cache, stores the result in buffer.
|
long |
getShadowCacheByteHit() |
long |
getShadowCacheByteRead() |
long |
getShadowCacheBytes() |
long |
getShadowCachePageHit() |
long |
getShadowCachePageRead() |
long |
getShadowCachePages() |
boolean |
put(PageId pageId,
java.nio.ByteBuffer page,
CacheContext cacheContext)
Puts a page into the cache manager with scope and quota respected.
|
CacheManager.State |
state() |
void |
stopUpdate()
Stop to switch bloom filters and update working set size.
|
void |
updateWorkingSetSize()
Update working set size in number of pages and bytes.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitget, get, get, getCachedPageIdsByFileId, put, put, putpublic CacheManagerWithShadowCache(CacheManager cacheManager, AlluxioConfiguration conf)
cacheManager - the real cache managerconf - the alluxio configurationpublic boolean put(PageId pageId, java.nio.ByteBuffer page, CacheContext cacheContext)
CacheManagerput in interface CacheManagerpageId - page identifierpage - page datacacheContext - cache related contextpublic int get(PageId pageId, int pageOffset, int bytesToRead, PageReadTargetBuffer target, CacheContext cacheContext)
CacheManagerget in interface CacheManagerpageId - page identifierpageOffset - offset into the pagebytesToRead - number of bytes to read in this pagetarget - destination buffer to writecacheContext - cache related contextpublic void updateWorkingSetSize()
public boolean delete(PageId pageId)
CacheManagerdelete in interface CacheManagerpageId - page identifierpublic void stopUpdate()
public CacheManager.State state()
state in interface CacheManagerpublic boolean append(PageId pageId, int appendAt, byte[] page, CacheContext cacheContext)
append in interface CacheManagerpublic void close()
throws java.lang.Exception
close in interface java.lang.AutoCloseablejava.lang.Exceptionpublic void aging()
public long getShadowCachePages()
public long getShadowCacheBytes()
public long getShadowCachePageRead()
public long getShadowCachePageHit()
public long getShadowCacheByteRead()
public long getShadowCacheByteHit()
Copyright © 2022. All Rights Reserved.