Class Chunk
- java.lang.Object
-
- org.dizitart.no2.mvstore.compat.v1.mvstore.Chunk
-
public class Chunk extends Object
A chunk of data, containing one or multiple pages.Chunks are page aligned (each page is usually 4096 bytes). There are at most 67 million (2^26) chunks, each chunk is at most 2 GB large.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classChunk.PositionComparator
-
Field Summary
Fields Modifier and Type Field Description longblockThe start block number within the file.intidThe chunk id.intlenThe length in number of blocks.intmapIdThe last used map id.static intMAX_IDThe maximum chunk id.longmaxLenThe sum of the max length of all pages.longmaxLenLiveThe sum of the max length of all pages that are in use.longnextThe predicted position of the next chunk.longtimeWhen this chunk was created, in milliseconds after the store was created.longunusedWhen this chunk was no longer needed, in milliseconds after the store was created.longversionThe version stored in this chunk.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringasString()Get the chunk data as a string.booleanequals(Object o)static ChunkfromString(String s)Build a block from the given string.inthashCode()StringtoString()
-
-
-
Field Detail
-
MAX_ID
public static final int MAX_ID
The maximum chunk id.- See Also:
- Constant Field Values
-
id
public final int id
The chunk id.
-
block
public volatile long block
The start block number within the file.
-
len
public int len
The length in number of blocks.
-
maxLen
public long maxLen
The sum of the max length of all pages.
-
maxLenLive
public long maxLenLive
The sum of the max length of all pages that are in use.
-
version
public long version
The version stored in this chunk.
-
time
public long time
When this chunk was created, in milliseconds after the store was created.
-
unused
public long unused
When this chunk was no longer needed, in milliseconds after the store was created. After this, the chunk is kept alive a bit longer (in case it is referenced in older versions).
-
mapId
public int mapId
The last used map id.
-
next
public long next
The predicted position of the next chunk.
-
-