ChunkCache (apache-cassandra API)
Date: 2018-02-14

org.apache.cassandra.cache

## Class ChunkCache

- java.lang.Object
- - org.apache.cassandra.cache.ChunkCache

- All Implemented Interfaces:
    com.github.benmanes.caffeine.cache.AsyncCacheLoader<org.apache.cassandra.cache.ChunkCache.Key,org.apache.cassandra.cache.ChunkCache.Buffer>, com.github.benmanes.caffeine.cache.CacheLoader<org.apache.cassandra.cache.ChunkCache.Key,org.apache.cassandra.cache.ChunkCache.Buffer>, com.github.benmanes.caffeine.cache.RemovalListener<org.apache.cassandra.cache.ChunkCache.Key,org.apache.cassandra.cache.ChunkCache.Buffer>, CacheSize

      public class ChunkCache
      extends java.lang.Object
      implements com.github.benmanes.caffeine.cache.CacheLoader<org.apache.cassandra.cache.ChunkCache.Key,org.apache.cassandra.cache.ChunkCache.Buffer>, com.github.benmanes.caffeine.cache.RemovalListener<org.apache.cassandra.cache.ChunkCache.Key,org.apache.cassandra.cache.ChunkCache.Buffer>, CacheSize

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static long` | `cacheSize`
    `static ChunkCache` | `instance`
    `CacheMissMetrics` | `metrics`
    `static int` | `RESERVED_POOL_SPACE_IN_MB`
    `static boolean` | `roundUp`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ChunkCache()`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `long` | `capacity()`
    `void` | `close()`
    `void` | `enable(boolean enabled)`
    `void` | `invalidateFile(java.lang.String fileName)`
    `void` | `invalidatePosition(FileHandle dfile, long position)`
    `org.apache.cassandra.cache.ChunkCache.Buffer` | `load(org.apache.cassandra.cache.ChunkCache.Key key)`
    `static RebuffererFactory` | `maybeWrap(ChunkReader file)`
    `void` | `onRemoval(org.apache.cassandra.cache.ChunkCache.Key key, org.apache.cassandra.cache.ChunkCache.Buffer buffer, com.github.benmanes.caffeine.cache.RemovalCause cause)`
    `void` | `setCapacity(long capacity)`
    `int` | `size()`
    `long` | `weightedSize()`
    `RebuffererFactory` | `wrap(ChunkReader file)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface com.github.benmanes.caffeine.cache.CacheLoader

      `asyncLoad, asyncLoadAll, asyncReload, loadAll, reload`

- - ### Field Detail

    - #### RESERVED_POOL_SPACE_IN_MB

          public static final int RESERVED_POOL_SPACE_IN_MB

      See Also:
        Constant Field Values

    - #### cacheSize

          public static final long cacheSize

    - #### roundUp

          public static final boolean roundUp

    - #### instance

          public static final ChunkCache instance

    - #### metrics

          public final CacheMissMetrics metrics

  - ### Constructor Detail

    - #### ChunkCache

          public ChunkCache()

  - ### Method Detail

    - #### load

          public org.apache.cassandra.cache.ChunkCache.Buffer load(org.apache.cassandra.cache.ChunkCache.Key key)
                                                            throws java.lang.Exception

      Specified by:
        `load` in interface `com.github.benmanes.caffeine.cache.CacheLoader<org.apache.cassandra.cache.ChunkCache.Key,org.apache.cassandra.cache.ChunkCache.Buffer>`
      Throws:
        `java.lang.Exception`

    - #### onRemoval

          public void onRemoval(org.apache.cassandra.cache.ChunkCache.Key key,
                                org.apache.cassandra.cache.ChunkCache.Buffer buffer,
                                com.github.benmanes.caffeine.cache.RemovalCause cause)

      Specified by:
        `onRemoval` in interface `com.github.benmanes.caffeine.cache.RemovalListener<org.apache.cassandra.cache.ChunkCache.Key,org.apache.cassandra.cache.ChunkCache.Buffer>`

    - #### close

          public void close()

    - #### wrap

          public RebuffererFactory wrap(ChunkReader file)

    - #### maybeWrap

          public static RebuffererFactory maybeWrap(ChunkReader file)

    - #### invalidatePosition

          public void invalidatePosition(FileHandle dfile,
                                         long position)

    - #### invalidateFile

          public void invalidateFile(java.lang.String fileName)

    - #### enable

          public void enable(boolean enabled)

    - #### capacity

          public long capacity()

      Specified by:
        `capacity` in interface `CacheSize`

    - #### setCapacity

          public void setCapacity(long capacity)

      Specified by:
        `setCapacity` in interface `CacheSize`

    - #### size

          public int size()

      Specified by:
        `size` in interface `CacheSize`

    - #### weightedSize

          public long weightedSize()

      Specified by:
        `weightedSize` in interface `CacheSize`

Copyright © 2018 The Apache Software Foundation