DfsBlockCache.
| Modifier and Type | Class and Description |
|---|---|
| private static class | BlockBasedFile.
A supplier of readable channel that opens the channel lazily. |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv volatile int | blockSize
Preferred alignment for loading blocks from the backing file. |
| pack-priv final DfsBlockCache | cache
Cache that owns this file and its data. |
| pack-priv final DfsPackDescription | desc
Description of the associated pack file's storage. |
| pack-priv final PackExt | |
| pack-priv volatile boolean | invalid
True once corruption has been detected that cannot be worked around. |
| protected volatile Exception | invalidatingCause
Exception that caused the packfile to be flagged as invalid |
| pack-priv final DfsStreamKey | key
Unique identity of this file while in-memory. |
| pack-priv volatile long | length
Total number of bytes in this pack file. |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv long | |
| pack-priv int | |
| pack-priv static long | |
| pack-priv String | |
| pack-priv DfsBlock | |
| pack-priv boolean | |
| pack-priv static int | |
| pack-priv DfsBlock | |
| pack-priv void | |
| pack-priv void |
| blockSize | back to summary |
|---|---|
| pack-priv volatile int blockSize Preferred alignment for loading blocks from the backing file. It is initialized to 0 and filled in on the first read made from the file. Block sizes may be odd, e.g. 4091, caused by the underling DFS storing 4091 user bytes and 5 bytes block metadata into a lower level 4096 byte block on disk. | |
| cache | back to summary |
|---|---|
| pack-priv final DfsBlockCache cache Cache that owns this file and its data. | |
| desc | back to summary |
|---|---|
| pack-priv final DfsPackDescription desc Description of the associated pack file's storage. | |
| ext | back to summary |
|---|---|
| pack-priv final PackExt ext | |
| invalid | back to summary |
|---|---|
| pack-priv volatile boolean invalid True once corruption has been detected that cannot be worked around. | |
| invalidatingCause | back to summary |
|---|---|
| protected volatile Exception invalidatingCause Exception that caused the packfile to be flagged as invalid | |
| key | back to summary |
|---|---|
| pack-priv final DfsStreamKey key Unique identity of this file while in-memory. | |
| length | back to summary |
|---|---|
| pack-priv volatile long length Total number of bytes in this pack file. This field initializes to -1 and gets populated when a block is loaded. | |
| BlockBasedFile | back to summary |
|---|---|
| pack-priv BlockBasedFile(DfsBlockCache cache, DfsPackDescription desc, PackExt ext) | |
| alignToBlock | back to summary |
|---|---|
| pack-priv long alignToBlock(long pos) | |
| blockSize | back to summary |
|---|---|
| pack-priv int blockSize(ReadableChannel rc) | |
| elapsedMicros | back to summary |
|---|---|
| pack-priv static long elapsedMicros(long start) | |
| getFileName | back to summary |
|---|---|
| pack-priv String getFileName() | |
| getOrLoadBlock | back to summary |
|---|---|
| pack-priv DfsBlock getOrLoadBlock(long pos, DfsReader ctx) throws IOException | |
| invalid | back to summary |
|---|---|
| pack-priv boolean invalid() | |
| read | back to summary |
|---|---|
| pack-priv static int read(ReadableChannel rc, ByteBuffer buf) throws IOException | |
| readOneBlock | back to summary |
|---|---|
| pack-priv DfsBlock readOneBlock(long pos, DfsReader ctx, ReadableChannel rc) throws IOException | |
| setBlockSize | back to summary |
|---|---|
| pack-priv void setBlockSize(int newSize) | |
| setInvalid | back to summary |
|---|---|
| pack-priv void setInvalid() | |
| Modifier and Type | Field and Description |
|---|---|
| private final DfsReader | |
| private final DfsPackDescription | |
| private final PackExt | |
| private ReadableChannel |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public void | close()
Implements java. Closes this resource, relinquishing any underlying resources. |
| public ReadableChannel | get()
Implements org. Get ReadableChannel |
| ctx | back to summary |
|---|---|
| private final DfsReader ctx | |
| desc | back to summary |
|---|---|
| private final DfsPackDescription desc | |
| ext | back to summary |
|---|---|
| private final PackExt ext | |
| rc | back to summary |
|---|---|
| private ReadableChannel rc | |
| LazyChannel | back to summary |
|---|---|
| pack-priv LazyChannel(DfsReader ctx, DfsPackDescription desc, PackExt ext) | |
| close | back to summary |
|---|---|
| public void close() throws IOException Implements java. Doc from java. Closes this resource, relinquishing any underlying resources.
This method is invoked automatically on objects managed by the
| |
| get | back to summary |
|---|---|
| public ReadableChannel get() throws IOException Implements org. Doc from org. Get ReadableChannel
| |