KeyCacheKey (apache-cassandra API)
Date: 2014-10-21

org.apache.cassandra.cache

## Class KeyCacheKey

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

- All Implemented Interfaces:
    CacheKey, IMeasurableMemory

      public class KeyCacheKey
      extends java.lang.Object
      implements CacheKey

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `java.util.UUID` | `cfId`
    `Descriptor` | `desc`
    `byte[]` | `key`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `KeyCacheKey(java.util.UUID cfId, Descriptor desc, java.nio.ByteBuffer key)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(java.lang.Object o)`
    `java.util.UUID` | `getCFId()`
    `int` | `hashCode()`
    `java.lang.String` | `toString()`
    `long` | `unsharedHeapSize()`

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

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### cfId

          public final java.util.UUID cfId

    - #### desc

          public final Descriptor desc

    - #### key

          public final byte[] key

  - ### Constructor Detail

    - #### KeyCacheKey

          public KeyCacheKey(java.util.UUID cfId,
                     Descriptor desc,
                     java.nio.ByteBuffer key)

  - ### Method Detail

    - #### getCFId

          public java.util.UUID getCFId()

      Specified by:
        `getCFId` in interface `CacheKey`
      Returns:
        The cf id of the cache key.

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

    - #### unsharedHeapSize

          public long unsharedHeapSize()

      Specified by:
        `unsharedHeapSize` in interface `IMeasurableMemory`
      Returns:
        the amount of on-heap memory retained by the object that might be reclaimed if the object were reclaimed, i.e. it should try to exclude globally cached data where possible, or counting portions of arrays that are referenced by the object but used by other objects only (e.g. slabbed byte-buffers), etc.

    - #### equals

          public boolean equals(java.lang.Object o)

      Overrides:
        `equals` in class `java.lang.Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `java.lang.Object`

Copyright © 2014 The Apache Software Foundation