Class CacheManager

java.lang.Object
org.drip.service.env.CacheManager

public class CacheManager
extends java.lang.Object
CacheManager implements the DRIP Cache Management Functionality, and contains the Functions to Add, Delete, Retrieve, and Time out a Key-Value Pair along the lines of memcached.



Author:
Lakshmi Krishnamurthy
  • Constructor Summary

    Constructors
    Constructor Description
    CacheManager()  
  • Method Summary

    Modifier and Type Method Description
    static boolean Contains​(java.lang.String strKey)
    The Contains Method checks the Presence of the specified Key
    static java.lang.String Get​(java.lang.String strKey)
    The Get Method retrieves the Value given the Key
    static boolean Init()
    Initialize the Cache Manager
    static java.lang.String Put​(java.lang.String strKey, java.lang.String strValue, long lSecondsToExpiry)
    The Put Method adds a Key/Value Pair to the In-Memory KV Store

    Methods inherited from class java.lang.Object

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

    • CacheManager

      public CacheManager()
  • Method Details

    • Init

      public static final boolean Init()
      Initialize the Cache Manager
      Returns:
      TRUE - The Cache Manager successfully initialized
    • Put

      public static final java.lang.String Put​(java.lang.String strKey, java.lang.String strValue, long lSecondsToExpiry)
      The Put Method adds a Key/Value Pair to the In-Memory KV Store
      Parameters:
      strKey - The Key
      strValue - The Value
      lSecondsToExpiry - The Time to Expiry of the Key/Value Pair
      Returns:
      Return Value from the Underlying HashMap.put
    • Contains

      public static final boolean Contains​(java.lang.String strKey)
      The Contains Method checks the Presence of the specified Key
      Parameters:
      strKey - The Key
      Returns:
      Return Value from the Underlying HashMap.contains
    • Get

      public static final java.lang.String Get​(java.lang.String strKey)
      The Get Method retrieves the Value given the Key
      Parameters:
      strKey - The Key
      Returns:
      Return Value from the Underlying HashMap.get