{
Map<String, Long> ret = null;
DBCollection dbcoll = fixColl(coll);
DBCursor cursor = dbcoll.find(dboEmpty, dboKeysIdandMtime);
try
{
ret = new HashMap<String, Long>(cursor.count());
while(cursor.hasNext())
{
BasicDBObject raw = (BasicDBObject)cursor.next();
Object remoteId = raw.get(ID_FIELD);
if ( ! raw.containsField(MTIME_FIELD)) continue; // This should not happen! But better to ignore than crash?
Long mtime = raw.getLong(MTIME_FIELD);
ret.put(remoteId.toString(), mtime);
}
}
finally
{
cursor.close();
}
return ret;
}