本文整理汇总了Java中storm.trident.util.LRUMap类的典型用法代码示例。如果您正苦于以下问题:Java LRUMap类的具体用法?Java LRUMap怎么用?Java LRUMap使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
LRUMap类属于storm.trident.util包,在下文中一共展示了LRUMap类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: LRUMemoryMapStateBacking
import storm.trident.util.LRUMap; //导入依赖的package包/类
public LRUMemoryMapStateBacking(int cacheSize, String id) {
this.db = (Map<List<Object>, T>) _dbs.get(id);
if (db == null) {
db = (Map<List<Object>, T>)new LRUMap<List<Object>, T>(cacheSize);
Map<List<Object>, T> tmp = (Map<List<Object>, T>)
_dbs.putIfAbsent(id, (Map<List<Object>, Object>)db);
if (tmp != null) {
db = tmp;
}
}
}
示例2: CachedMap
import storm.trident.util.LRUMap; //导入依赖的package包/类
public CachedMap(IBackingMap<T> delegate, int cacheSize) {
_cache = new LRUMap<List<Object>, T>(cacheSize);
_delegate = delegate;
}
示例3: LRUMemoryMapStateBacking
import storm.trident.util.LRUMap; //导入依赖的package包/类
public LRUMemoryMapStateBacking(int cacheSize, String id) {
_dbs.putIfAbsent(id, new LRUMap<List<Object>, Object>(cacheSize));
this.db = (Map<List<Object>, T>) _dbs.get(id);
}
示例4: LRUMemoryMapStateBacking
import storm.trident.util.LRUMap; //导入依赖的package包/类
public LRUMemoryMapStateBacking(int cacheSize, String id) {
if (!_dbs.containsKey(id)) {
_dbs.put(id, new LRUMap<List<Object>, Object>(cacheSize));
}
this.db = (Map<List<Object>, T>) _dbs.get(id);
}