Class StringKeyCache

java.lang.Object
com.scaleout.client.caching.StringKeyCache

public class StringKeyCache extends Object
Maintains an in-process cache of string keys.
  • Constructor Summary

    Constructors
    Constructor
    Description
    StringKeyCache(GridConnection connection, String name, int size, boolean legacy)
    Instantiate the string key cache with a grid connection, name, max size, and record if legacy string (unicode) keys are in use.
  • Method Summary

    Modifier and Type
    Method
    Description
    get(byte[] serial)
    Retrieve the string key for this hashed string key.
    void
    put(byte[] serial, String key)
    Add an item to this in-process string key cache

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • StringKeyCache

      public StringKeyCache(GridConnection connection, String name, int size, boolean legacy)
      Instantiate the string key cache with a grid connection, name, max size, and record if legacy string (unicode) keys are in use.
      Parameters:
      connection - the grid connection
      name - the name of the Cache where this string key cache is used
      size - the max size of the string key cache
      legacy - flag to record if this cache is using legacy string keys
  • Method Details

    • get

      public String get(byte[] serial)
      Retrieve the string key for this hashed string key.
      Parameters:
      serial - the hashed string key
      Returns:
      the string key
    • put

      public void put(byte[] serial, String key)
      Add an item to this in-process string key cache
      Parameters:
      serial - the hashed string key
      key - the string key