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 mem-cache-d. It provides the following Functions:
  • Initialize the Cache Manager
  • Put Method adds a Key/Value Pair to the In-Memory KV Store
  • Contains Method checks the Presence of the specified Key
  • Get Method retrieves the Value given the Key

Module Computational Core Module
Library Computation Support
Project Environment, Product/Definition Containers, and Scenario/State Manipulation APIs
Package Library Module Loader Environment Manager

Author:
Lakshmi Krishnamurthy
  • Constructor Summary

    Constructors
    Constructor Description
    CacheManager()  
  • Method Summary

    Modifier and Type Method Description
    static boolean Contains​(java.lang.String key)
    Contains Method checks the Presence of the specified Key
    static java.lang.String Get​(java.lang.String key)
    Get Method retrieves the Value given the Key
    static boolean Init()
    Initialize the Cache Manager
    static java.lang.String Put​(java.lang.String key, java.lang.String value, long secondsToExpiry)
    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 key, java.lang.String value, long secondsToExpiry)
      Put Method adds a Key/Value Pair to the In-Memory KV Store
      Parameters:
      key - The Key
      value - The Value
      secondsToExpiry - 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 key)
      Contains Method checks the Presence of the specified Key
      Parameters:
      key - The Key
      Returns:
      Return Value from the Underlying HashMap.contains
    • Get

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