下面列出了com.mongodb.DBCollection#getName ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。
@Override
public DBCollection getPreviousWithLimit(DBCollection current, long minTime) {
// figure out the current timeslice
String currentName = current.getName();
long currSuffix = getSuffix(currentName);
// If minTime is before the lower bound of this collection,
// just get the collection with the previous suffix
if(minTime < currSuffix*this.period){
return db.getCollection(this.prefix + (currSuffix - 1));
}
return null;
}
protected String getFullyQualifiedId(DBObject dbObject, DBCollection dbCollection) {
if (dbCollection == null) return null;
return dbCollection.getDB().getName() + "." + dbCollection.getName() + "." + dbObject.get("_id");
}