| Modifier and Type | Class and Description |
|---|---|
| public static interface | DfsBlockCacheTable.
Provides methods used with Block Cache statistics. |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | Returns: if the block cache contains the object identified by (key, position).the stream key of the pack. key, long the position in the key. position)Check if the block cache contains an object identified by (key, position). |
| public <T> T | Returns: the object identified by (key, position).the stream key of the pack. key, long the position in the key. position)Get the object identified by (key, position) from the block cache. |
| public List | Returns: the list ofBlockCacheStats held by this cache.Get the list of |
| public String | |
| public DfsBlock | Returns: the object reference.the pack that "contains" the cached object. file, long offset within position, DfsReader pack of the object.current thread's reader. dfsReader, DfsBlockCache.supplier for channel to read fileChannelpack.Look up a cached object, creating and loading it if it doesn't exist. |
| public <T> DfsBlockCache. | Returns: the object reference.the stream key of the pack. key, long the position in the key. The default should be 0. position, DfsBlockCache.the function to load the reference. loaderLook up a cached object, creating and loading it if it doesn't exist. |
| public boolean | Returns: true if block 0 (the first block) is in the cache.the file to check. key)Quickly check if the cache contains block 0 of the given stream. |
| public void | |
| public <T> DfsBlockCache. | Returns: the object reference.the stream key of the pack. key, long the position in the key. pos, long the size of the object. size, T the object to put in the block cache. v)Put a block in the block cache. |
| public <T> DfsBlockCache. | Returns: the object reference.the stream key of the pack. key, long the size of the object. size, T the object to put in the block cache. v)Put an object in the block cache. |
| contains | back to summary |
|---|---|
| public boolean contains(DfsStreamKey key, long position) Check if the block cache contains an object identified by (key, position).
| |
| get | back to summary |
|---|---|
| public <T> T get(DfsStreamKey key, long position) Get the object identified by (key, position) from the block cache.
| |
| getBlockCacheStats | back to summary |
|---|---|
| public List Get the list of
The returned list has a
| |
| getName | back to summary |
|---|---|
| public String getName() Get the name of the table.
| |
| getOrLoad | back to summary |
|---|---|
| public DfsBlock getOrLoad(BlockBasedFile file, long position, DfsReader dfsReader, DfsBlockCache. Look up a cached object, creating and loading it if it doesn't exist.
| |
| getOrLoadRef | back to summary |
|---|---|
| public <T> DfsBlockCache. Look up a cached object, creating and loading it if it doesn't exist.
| |
| hasBlock0 | back to summary |
|---|---|
| public boolean hasBlock0(DfsStreamKey key) Quickly check if the cache contains block 0 of the given stream. This can be useful for sophisticated pre-read algorithms to quickly determine if a file is likely already in cache, especially small reftables which may be smaller than a typical DFS block size.
| |
| put | back to summary |
|---|---|
| public void put(DfsBlock v) Put a block in the block cache.
| |
| put | back to summary |
|---|---|
| public <T> DfsBlockCache. Put a block in the block cache.
| |
| putRef | back to summary |
|---|---|
| public <T> DfsBlockCache. Put an object in the block cache.
| |
| Modifier and Type | Method and Description |
|---|---|
| public long[] | Returns: total number of bytes in the cache, per pack file extension.Get total number of bytes in the cache, per pack file extension. |
| public long[] | Returns: the number of evictions performed due to cache being full, per pack file extension.Get number of evictions performed due to cache being full, per pack file extension. |
| public long[] | Returns: the number of requests for items in the cache, per pack file extension.Get number of requests for items in the cache, per pack file extension. |
| public long[] | |
| public long[] | Returns: the number of requests for items not in the cache, per pack file extension.Get number of requests for items not in the cache, per pack file extension. |
| public String | |
| public long[] | Returns: total number of requests (hit + miss), per pack file extension.Get total number of requests (hit + miss), per pack file extension. |
| getCurrentSize | back to summary |
|---|---|
| public long[] getCurrentSize() Get total number of bytes in the cache, per pack file extension.
| |
| getEvictions | back to summary |
|---|---|
| public long[] getEvictions() Get number of evictions performed due to cache being full, per pack file extension.
| |
| getHitCount | back to summary |
|---|---|
| public long[] getHitCount() Get number of requests for items in the cache, per pack file extension.
| |
| getHitRatio | back to summary |
|---|---|
| public long[] getHitRatio() Get hit ratios.
| |
| getMissCount | back to summary |
|---|---|
| public long[] getMissCount() Get number of requests for items not in the cache, per pack file extension.
| |
| getName | back to summary |
|---|---|
| public String getName() Get the name of the block cache generating this instance.
| |
| getTotalRequestCount | back to summary |
|---|---|
| public long[] getTotalRequestCount() Get total number of requests (hit + miss), per pack file extension.
| |