Package org.drip.service.env
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.
- 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 strKey)
The Contains Method checks the Presence of the specified Keystatic java.lang.String
Get(java.lang.String strKey)
The Get Method retrieves the Value given the Keystatic boolean
Init()
Initialize the Cache Managerstatic 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 StoreMethods 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 KeystrValue
- The ValuelSecondsToExpiry
- 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
-