Class NearCacheKey<K,T>

java.lang.Object
org.gridgain.internal.table.nearcache.NearCacheKey<K,T>

public abstract class NearCacheKey<K,T> extends Object
Near Cache key. This class has two main purposes: 1. Implement a proper binary tuple comparison for keys in Near Cache; 2. Cache both binary and serialized form to increase key read performance.
  • Constructor Details

    • NearCacheKey

      public NearCacheKey(K key, T serializedKey)
      Constructor.
      Parameters:
      key - Key.
      serializedKey - Serialized key.
  • Method Details

    • key

      public K key()
      Get key.
      Returns:
      Key.
    • serializedKey

      public T serializedKey()
      Get serialized key.
      Returns:
      Serialized key.
    • dataEquals

      protected abstract boolean dataEquals(T otherSerializedKey)
    • dataHash

      protected abstract int dataHash()
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object