Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class AppengineMemCacheMap implements IQuoteCache {
- private Cache cache;
- public AppengineMemCacheMap() {
- Map props = new HashMap();
- props.put(GCacheFactory.EXPIRATION_DELTA, 60);// seconds
- try {
- CacheFactory cacheFactory = CacheManager.getInstance()
- .getCacheFactory();
- cache = cacheFactory.createCache(props);
- }
- @Override
- public void updateQuote(ICodeQuote stock) {
- cache.put(stock.getCodigo(), stock);
- }
- ...
- }
Add Comment
Please, Sign In to add comment