public class RocksPageStoreDir extends Object
LOG
Constructor and Description |
---|
RocksPageStoreDir(PageStoreOptions pageStoreOptions,
PageStore pageStore,
CacheEvictor cacheEvictor)
Constructor of RocksPageStoreDir.
|
Modifier and Type | Method and Description |
---|---|
void |
abort(String fileId)
Abort a temporary file.
|
void |
close()
Close the page store dir.
|
void |
commit(String fileId,
String newFileId)
Commit a temporary file with a new file ID.
|
long |
deletePage(PageInfo pageInfo) |
long |
getCachedBytes() |
long |
getCapacityBytes() |
CacheEvictor |
getEvictor() |
PageStore |
getPageStore() |
Path |
getRootPath() |
boolean |
hasFile(String fileId) |
boolean |
hasTempFile(String fileId) |
void |
putPage(PageInfo pageInfo) |
boolean |
putTempFile(String fileId) |
void |
putTempPage(PageInfo pageInfo) |
long |
release(long bytes)
Release the pre-reserved space.
|
boolean |
reserve(long 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, commit, createPageStoreDir, createPageStoreDirs, getFileBucket
public RocksPageStoreDir(PageStoreOptions pageStoreOptions, PageStore pageStore, CacheEvictor cacheEvictor)
pageStoreOptions
- pageStore
- cacheEvictor
- public PageStore getPageStore()
public void reset() throws IOException
PageStoreDir
IOException
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 void putPage(PageInfo pageInfo)
putPage
in interface PageStoreDir
public void putTempPage(PageInfo pageInfo)
putTempPage
in interface PageStoreDir
public long deletePage(PageInfo pageInfo)
deletePage
in interface PageStoreDir
public boolean putTempFile(String fileId)
putTempFile
in interface PageStoreDir
fileId
- file idpublic boolean reserve(long bytes)
reserve
in interface PageStoreDir
public long release(long bytes)
PageStoreDir
release
in interface PageStoreDir
public boolean hasFile(String fileId)
hasFile
in interface PageStoreDir
public boolean hasTempFile(String fileId)
hasTempFile
in interface PageStoreDir
public CacheEvictor getEvictor()
getEvictor
in interface PageStoreDir
public void close()
PageStoreDir
close
in interface PageStoreDir
public void commit(String fileId, String newFileId) throws IOException
PageStoreDir
commit
in interface PageStoreDir
IOException
public void abort(String fileId) throws IOException
PageStoreDir
abort
in interface PageStoreDir
IOException
Copyright © 2023. All Rights Reserved.