Class Chunk
java.lang.Object
org.dizitart.no2.mvstore.compat.v1.mvstore.Chunk
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 -
Field Summary
FieldsModifier and TypeFieldDescriptionlongThe start block number within the file.final intThe chunk id.intThe length in number of blocks.intThe last used map id.static final intThe maximum chunk id.longThe sum of the max length of all pages.longThe sum of the max length of all pages that are in use.longThe predicted position of the next chunk.longWhen this chunk was created, in milliseconds after the store was created.longWhen this chunk was no longer needed, in milliseconds after the store was created.longThe version stored in this chunk. -
Method Summary
-
Field Details
-
MAX_ID
public static final int MAX_IDThe maximum chunk id.- See Also:
-
id
public final int idThe chunk id. -
block
public volatile long blockThe start block number within the file. -
len
public int lenThe length in number of blocks. -
maxLen
public long maxLenThe sum of the max length of all pages. -
maxLenLive
public long maxLenLiveThe sum of the max length of all pages that are in use. -
version
public long versionThe version stored in this chunk. -
time
public long timeWhen this chunk was created, in milliseconds after the store was created. -
unused
public long unusedWhen 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 mapIdThe last used map id. -
next
public long nextThe predicted position of the next chunk.
-
-
Method Details
-
fromString
Build a block from the given string.- Parameters:
s- the string- Returns:
- the block
-
hashCode
public int hashCode() -
equals
-
asString
Get the chunk data as a string.- Returns:
- the string
-
toString
-