public class MemoryCollection
extends de.bwaldvogel.mongo.backend.AbstractMongoCollection<java.lang.Integer>
| Constructor and Description |
|---|
MemoryCollection(java.lang.String databaseName,
java.lang.String collectionName,
java.lang.String idField) |
| Modifier and Type | Method and Description |
|---|---|
protected java.lang.Integer |
addDocumentInternal(de.bwaldvogel.mongo.bson.Document document) |
int |
count() |
protected java.lang.Integer |
findDocumentPosition(de.bwaldvogel.mongo.bson.Document document) |
protected int |
getDataSize() |
protected de.bwaldvogel.mongo.bson.Document |
getDocument(java.lang.Integer position) |
protected void |
handleUpdate(de.bwaldvogel.mongo.bson.Document document) |
protected java.lang.Iterable<de.bwaldvogel.mongo.bson.Document> |
matchDocuments(de.bwaldvogel.mongo.bson.Document query,
de.bwaldvogel.mongo.bson.Document orderBy,
int numberToSkip,
int numberToReturn) |
protected java.lang.Iterable<de.bwaldvogel.mongo.bson.Document> |
matchDocuments(de.bwaldvogel.mongo.bson.Document query,
java.lang.Iterable<java.lang.Integer> positions,
de.bwaldvogel.mongo.bson.Document orderBy,
int numberToSkip,
int numberToReturn) |
protected void |
removeDocument(java.lang.Integer position) |
protected void |
updateDataSize(int sizeDelta) |
addDocument, addIndex, count, deleteDocuments, documentMatchesQuery, findAndModify, getCollectionName, getDatabaseName, getFullName, getNumIndexes, getStats, handleDistinct, handleQuery, insertDocuments, removeDocument, renameTo, sortDocumentsInMemory, toString, updateDocuments, validatepublic MemoryCollection(java.lang.String databaseName,
java.lang.String collectionName,
java.lang.String idField)
protected void updateDataSize(int sizeDelta)
updateDataSize in class de.bwaldvogel.mongo.backend.AbstractMongoCollection<java.lang.Integer>protected int getDataSize()
getDataSize in class de.bwaldvogel.mongo.backend.AbstractMongoCollection<java.lang.Integer>protected java.lang.Integer addDocumentInternal(de.bwaldvogel.mongo.bson.Document document)
addDocumentInternal in class de.bwaldvogel.mongo.backend.AbstractMongoCollection<java.lang.Integer>protected java.lang.Iterable<de.bwaldvogel.mongo.bson.Document> matchDocuments(de.bwaldvogel.mongo.bson.Document query,
java.lang.Iterable<java.lang.Integer> positions,
de.bwaldvogel.mongo.bson.Document orderBy,
int numberToSkip,
int numberToReturn)
matchDocuments in class de.bwaldvogel.mongo.backend.AbstractMongoCollection<java.lang.Integer>protected java.lang.Iterable<de.bwaldvogel.mongo.bson.Document> matchDocuments(de.bwaldvogel.mongo.bson.Document query,
de.bwaldvogel.mongo.bson.Document orderBy,
int numberToSkip,
int numberToReturn)
matchDocuments in class de.bwaldvogel.mongo.backend.AbstractMongoCollection<java.lang.Integer>public int count()
protected java.lang.Integer findDocumentPosition(de.bwaldvogel.mongo.bson.Document document)
findDocumentPosition in class de.bwaldvogel.mongo.backend.AbstractMongoCollection<java.lang.Integer>protected void removeDocument(java.lang.Integer position)
removeDocument in class de.bwaldvogel.mongo.backend.AbstractMongoCollection<java.lang.Integer>protected de.bwaldvogel.mongo.bson.Document getDocument(java.lang.Integer position)
getDocument in class de.bwaldvogel.mongo.backend.AbstractMongoCollection<java.lang.Integer>protected void handleUpdate(de.bwaldvogel.mongo.bson.Document document)
handleUpdate in class de.bwaldvogel.mongo.backend.AbstractMongoCollection<java.lang.Integer>