Database Reference
In-Depth Information
}
}
/**
* Shutdown the client and nullify it
*/
public void shutdown() {
logger.info("Shutting down memcache client ");
client.shutdown();
client = null;
}
/**
* This method sets a value in cache with a specific key
and timeout
* @param key the unique key to identify the value
* @paramtimeOut the time interval in ms after which the
value would be refreshed
* @paramval
* @return
*/
public Future < Boolean > addToMemCache(String key,
inttimeOut, Object val) {
if (null != client) {
Future < Boolean > future = client.set(key, timeOut,
val);
return future;
} else {
return null;
}
}
/**
* retrives and returns the value object against the key
passed in as parameter
* @param key
* @return
Search WWH ::




Custom Search