Class FilePageStoreV2
- java.lang.Object
-
- org.apache.ignite.internal.processors.cache.persistence.file.FilePageStore
-
- org.apache.ignite.internal.processors.cache.persistence.file.FilePageStoreV2
-
- All Implemented Interfaces:
Closeable,AutoCloseable,PageStore
public class FilePageStoreV2 extends FilePageStore
-
-
Field Summary
Fields Modifier and Type Field Description static intVERSIONFile version.-
Fields inherited from class org.apache.ignite.internal.processors.cache.persistence.file.FilePageStore
fileIO, HEADER_SIZE, pageSize
-
-
Constructor Summary
Constructors Constructor Description FilePageStoreV2(byte type, IgniteOutClosure<Path> pathProvider, FileIOFactory factory, int pageSize, LongConsumer allocatedTracker)Constructor which initializes file path provider closure, allowing to calculate file path in any time.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetBlockSize()longgetSparseSize()intheaderSize()Size of page store header.voidpunchHole(long pageId, int usefulBytes)Should free all the extra storage space after the given number of useful bytes in the given page.intversion()Page store version.-
Methods inherited from class org.apache.ignite.internal.processors.cache.persistence.file.FilePageStore
addWriteListener, allocatePage, beginRecover, close, ensure, exists, finishRecover, getFileAbsolutePath, getPageSize, header, init, pageOffset, pages, read, read, readHeader, removeWriteListener, size, stop, sync, truncate, write
-
-
-
-
Field Detail
-
VERSION
public static final int VERSION
File version.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
FilePageStoreV2
public FilePageStoreV2(byte type, IgniteOutClosure<Path> pathProvider, FileIOFactory factory, int pageSize, LongConsumer allocatedTracker)Constructor which initializes file path provider closure, allowing to calculate file path in any time.- Parameters:
type- Type.pathProvider- file path provider.factory- Factory.pageSize- Page size.allocatedTracker- Allocated tracker.
-
-
Method Detail
-
headerSize
public int headerSize()
Size of page store header.- Overrides:
headerSizein classFilePageStore
-
version
public int version()
Page store version.- Specified by:
versionin interfacePageStore- Overrides:
versionin classFilePageStore- Returns:
- Page store version.
-
getBlockSize
public int getBlockSize()
- Specified by:
getBlockSizein interfacePageStore- Overrides:
getBlockSizein classFilePageStore- Returns:
- Storage block size or negative value if unknown or not supported.
-
getSparseSize
public long getSparseSize()
- Specified by:
getSparseSizein interfacePageStore- Overrides:
getSparseSizein classFilePageStore- Returns:
- Size of the storage adjusted for sparsity in bytes or negative
value if not supported. Should be less than or equal to
PageStore.size(). - See Also:
PageStore.punchHole(long, int)
-
punchHole
public void punchHole(long pageId, int usefulBytes)Should free all the extra storage space after the given number of useful bytes in the given page.- Specified by:
punchHolein interfacePageStore- Overrides:
punchHolein classFilePageStore- Parameters:
pageId- Page id.usefulBytes- Number of meaningful bytes from the beginning of the page.
-
-