edu.qut.cs.rcmd.common.mongo.cache
Class BaseMongoCache<K,V>
java.lang.Object
edu.qut.cs.rcmd.common.mongo.cache.BaseMongoCache<K,V>
- All Implemented Interfaces:
- MongoCache<K,V>
- Direct Known Subclasses:
- AutoFetchMongoCache
public class BaseMongoCache<K,V>
- extends Object
- implements MongoCache<K,V>
Field Summary |
protected com.mongodb.DBCollection |
dbCollection
|
Constructor Summary |
BaseMongoCache(com.mongodb.DBCollection dbCollection)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
dbCollection
protected com.mongodb.DBCollection dbCollection
BaseMongoCache
public BaseMongoCache(com.mongodb.DBCollection dbCollection)
get
public V get(K key)
- Specified by:
get
in interface MongoCache<K,V>
clear
public void clear()
- Specified by:
clear
in interface MongoCache<K,V>
put
public void put(K key,
V value)
- Specified by:
put
in interface MongoCache<K,V>
containsKey
public boolean containsKey(K key)
- Specified by:
containsKey
in interface MongoCache<K,V>
toValueDBObject
protected com.mongodb.DBObject toValueDBObject(V value)
toKeyDBObject
protected com.mongodb.DBObject toKeyDBObject(K key)
toValue
protected V toValue(com.mongodb.DBObject dbObject)
Copyright © 2012. All Rights Reserved.