public final class Chunk
extends java.lang.Object
Minimum chunk size is usually 4096 bytes, and it grows in those fixed increments (blocks). Chunk's length and it's position in the underlying filestore are multiples of that increment (block size), therefore they both are measured in blocks, instead of bytes. There are at most 67 million (2^26) chunks, and each chunk is at most 2 GB large.
| Modifier and Type | Class and Description |
|---|---|
static class |
Chunk.PositionComparator |
| Modifier and Type | Field and Description |
|---|---|
long |
block
The start block number within the file.
|
int |
id
The chunk id.
|
int |
len
The length in number of blocks.
|
int |
mapId
The last used map id.
|
static int |
MAX_ID
The maximum chunk id.
|
long |
maxLen
The sum of the max length of all pages.
|
long |
maxLenLive
The sum of the length of all pages that are still alive.
|
long |
next
The predicted position of the next chunk.
|
long |
time
When this chunk was created, in milliseconds after the store was created.
|
long |
unused
When this chunk was no longer needed, in milliseconds after the store was
created.
|
long |
version
The version stored in this chunk.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
asString()
Get the chunk data as a string.
|
boolean |
equals(java.lang.Object o) |
static Chunk |
fromString(java.lang.String s)
Build a block from the given string.
|
int |
hashCode() |
java.lang.String |
toString() |
public static final int MAX_ID
public final int id
public volatile long block
public int len
public long maxLen
public long maxLenLive
public long version
public long time
public long unused
public int mapId
public long next
public static Chunk fromString(java.lang.String s)
s - the stringpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic java.lang.String asString()
public java.lang.String toString()
toString in class java.lang.Object