Package com.arcadedb.engine
Class PageManager
- java.lang.Object
-
- com.arcadedb.utility.LockContext
-
- com.arcadedb.engine.PageManager
-
public class PageManager extends LockContext
Manages pages from disk to RAM. Each page can have different size.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
PageManager.ConcurrentPageAccessCallback
static class
PageManager.PPageManagerStats
-
Constructor Summary
Constructors Constructor Description PageManager(FileManager fileManager, TransactionManager txManager, ContextConfiguration configuration, String databaseName)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
checkPageVersion(MutablePage page, boolean isNew)
void
clear()
void
close()
void
deleteFile(int fileId)
protected void
flushPage(MutablePage page)
ImmutablePage
getImmutablePage(PageId pageId, int pageSize, boolean isNew, boolean createIfNotExists)
MutablePage
getMutablePage(PageId pageId, int pageSize, boolean isNew, boolean createIfNotExists)
PageManager.PPageManagerStats
getStats()
boolean
isPageFlushingSuspended()
void
kill()
Test only API.void
overwritePage(MutablePage page)
void
removePageFromCache(PageId pageId)
void
suspendFlushAndExecute(CallableNoReturn callback)
void
updatePages(Map<PageId,MutablePage> newPages, Map<PageId,MutablePage> modifiedPages, boolean asyncFlush)
MutablePage
updatePageVersion(MutablePage page, boolean isNew)
void
writePages(List<MutablePage> updatedPages, boolean asyncFlush)
-
Methods inherited from class com.arcadedb.utility.LockContext
executeInLock, lock, manageExceptionInLock, unlock
-
-
-
-
Constructor Detail
-
PageManager
public PageManager(FileManager fileManager, TransactionManager txManager, ContextConfiguration configuration, String databaseName)
-
-
Method Detail
-
close
public void close()
-
suspendFlushAndExecute
public void suspendFlushAndExecute(CallableNoReturn callback) throws IOException, InterruptedException
- Throws:
IOException
InterruptedException
-
isPageFlushingSuspended
public boolean isPageFlushingSuspended()
-
kill
public void kill()
Test only API.
-
clear
public void clear()
-
deleteFile
public void deleteFile(int fileId)
-
getImmutablePage
public ImmutablePage getImmutablePage(PageId pageId, int pageSize, boolean isNew, boolean createIfNotExists) throws IOException
- Throws:
IOException
-
getMutablePage
public MutablePage getMutablePage(PageId pageId, int pageSize, boolean isNew, boolean createIfNotExists) throws IOException
- Throws:
IOException
-
checkPageVersion
public void checkPageVersion(MutablePage page, boolean isNew) throws IOException
- Throws:
IOException
-
updatePages
public void updatePages(Map<PageId,MutablePage> newPages, Map<PageId,MutablePage> modifiedPages, boolean asyncFlush) throws IOException, InterruptedException
- Throws:
IOException
InterruptedException
-
updatePageVersion
public MutablePage updatePageVersion(MutablePage page, boolean isNew) throws IOException, InterruptedException
- Throws:
IOException
InterruptedException
-
overwritePage
public void overwritePage(MutablePage page) throws IOException
- Throws:
IOException
-
getStats
public PageManager.PPageManagerStats getStats()
-
removePageFromCache
public void removePageFromCache(PageId pageId)
-
writePages
public void writePages(List<MutablePage> updatedPages, boolean asyncFlush) throws IOException, InterruptedException
- Throws:
IOException
InterruptedException
-
flushPage
protected void flushPage(MutablePage page) throws IOException
- Throws:
IOException
-
-