Class PageStoreManagerImpl
java.lang.Object
org.apache.ignite.internal.pagemem.PageStoreManagerImpl
- All Implemented Interfaces:
PageStoreManager
The default implementation of
PageStoreManager interface.-
Constructor Summary
ConstructorsConstructorDescriptionPageStoreManagerImpl(int pageSize, boolean forceSync) Constructs a new instance. -
Method Summary
Modifier and TypeMethodDescriptionintallocatePage(int grpId) Allocates a page for the given page space.voidexportStore(int grpId, Path destinationPath) Exports the store.booleanisMetaPagePersisted(int grpId) Checks if meta page for specified store is persisted.intmetaPageId(int grpId) Gets meta page ID for specified store.intpageCount(int grpId) Gets page count.voidread(int grpId, int pageId, ByteBuffer pageBuf) Reads a page for the given group ID.voidreservePage(int grpId, int pageId) Reserves a page.voidstartStore(int grpId, Path path, boolean restorationMode) Starts the store with the specified ID.voidstopStore(int grpId) Stops the store with the specified ID.voidwrite(int grpId, int pageId, ByteBuffer pageBuf) Writes the page for the given group ID.
-
Constructor Details
-
PageStoreManagerImpl
public PageStoreManagerImpl(int pageSize, boolean forceSync) Constructs a new instance.- Parameters:
pageSize- Page size. Must be greater than0.forceSync-
-
-
Method Details
-
read
Description copied from interface:PageStoreManagerReads a page for the given group ID. Cache ID may be0if the page is a meta page.- Specified by:
readin interfacePageStoreManagerpageId- PageID to read.pageBuf- Page buffer to write to.- Throws:
IgniteCheckedException- if fails.
-
write
Description copied from interface:PageStoreManagerWrites the page for the given group ID. Cache ID may be0if the page is a meta page.- Specified by:
writein interfacePageStoreManager- Parameters:
grpId- Group ID.pageId- Page ID.pageBuf- Page buffer to write.- Throws:
IgniteCheckedException- if fails.
-
allocatePage
public int allocatePage(int grpId) Description copied from interface:PageStoreManagerAllocates a page for the given page space.- Specified by:
allocatePagein interfacePageStoreManager- Parameters:
grpId- Group ID.- Returns:
- Allocated page ID.
-
reservePage
Description copied from interface:PageStoreManagerReserves a page.- Specified by:
reservePagein interfacePageStoreManager- Parameters:
grpId- Group ID.pageId- Page ID.- Throws:
IgniteCheckedException- if fails.
-
metaPageId
public int metaPageId(int grpId) Description copied from interface:PageStoreManagerGets meta page ID for specified store.- Specified by:
metaPageIdin interfacePageStoreManager- Parameters:
grpId- Group ID.- Returns:
- Meta page ID.
-
isMetaPagePersisted
Description copied from interface:PageStoreManagerChecks if meta page for specified store is persisted.- Specified by:
isMetaPagePersistedin interfacePageStoreManager- Parameters:
grpId- Group ID.- Returns:
trueif persisted,falseotherwise.- Throws:
IgniteCheckedException- if fails.
-
pageCount
public int pageCount(int grpId) Description copied from interface:PageStoreManagerGets page count.- Specified by:
pageCountin interfacePageStoreManager- Parameters:
grpId- Group ID.- Returns:
- Page count.
-
startStore
Description copied from interface:PageStoreManagerStarts the store with the specified ID.- Specified by:
startStorein interfacePageStoreManager- Parameters:
grpId- Group ID.path- Path.restorationMode- Flag indicating restoration mode.- Throws:
IgniteCheckedException- if fails.
-
stopStore
Description copied from interface:PageStoreManagerStops the store with the specified ID.- Specified by:
stopStorein interfacePageStoreManager- Parameters:
grpId- Group ID.- Throws:
IgniteCheckedException- if fails.
-
exportStore
Description copied from interface:PageStoreManagerExports the store.- Specified by:
exportStorein interfacePageStoreManager- Parameters:
grpId- Group ID.destinationPath- destination path.- Throws:
IgniteCheckedException- if fails.
-