public class MemoryPageStoreDir extends Object
LOG
Constructor and Description |
---|
MemoryPageStoreDir(PageStoreOptions pageStoreOptions,
MemoryPageStore pageStore,
CacheEvictor cacheEvictor)
Constructor of MemPageStoreDir.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Close the page store dir.
|
long |
deletePage(PageInfo pageInfo) |
long |
getCachedBytes() |
long |
getCapacityBytes() |
CacheEvictor |
getEvictor() |
PageStore |
getPageStore() |
Path |
getRootPath() |
boolean |
hasFile(String fileId) |
boolean |
putPage(PageInfo pageInfo) |
boolean |
putTempFile(String fileId) |
long |
release(int bytes)
Release the pre-reserved space.
|
boolean |
reserve(int bytes) |
void |
reset()
Reset page store.
|
void |
scanPages(java.util.function.Consumer<Optional<PageInfo>> pageInfoConsumer)
Scan the pages under this dir.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
clear, createPageStoreDir, createPageStoreDirs, getFileBucket
public MemoryPageStoreDir(PageStoreOptions pageStoreOptions, MemoryPageStore pageStore, CacheEvictor cacheEvictor)
pageStoreOptions
- page store optionspageStore
- the PageStore instancecacheEvictor
- the evictorpublic PageStore getPageStore()
public void reset()
PageStoreDir
public void scanPages(java.util.function.Consumer<Optional<PageInfo>> pageInfoConsumer)
PageStoreDir
public Path getRootPath()
getRootPath
in interface PageStoreDir
public long getCapacityBytes()
getCapacityBytes
in interface PageStoreDir
public long getCachedBytes()
getCachedBytes
in interface PageStoreDir
public boolean putPage(PageInfo pageInfo)
putPage
in interface PageStoreDir
public long deletePage(PageInfo pageInfo)
deletePage
in interface PageStoreDir
public boolean putTempFile(String fileId)
putTempFile
in interface PageStoreDir
public boolean reserve(int bytes)
reserve
in interface PageStoreDir
public long release(int bytes)
PageStoreDir
release
in interface PageStoreDir
public boolean hasFile(String fileId)
hasFile
in interface PageStoreDir
public CacheEvictor getEvictor()
getEvictor
in interface PageStoreDir
public void close()
PageStoreDir
close
in interface PageStoreDir
Copyright © 2023. All Rights Reserved.