Class MemoryCollection
- All Implemented Interfaces:
de.bwaldvogel.mongo.MongoCollection<Integer>
public class MemoryCollection
extends de.bwaldvogel.mongo.backend.AbstractSynchronizedMongoCollection<Integer>
-
Nested Class Summary
Nested classes/interfaces inherited from class de.bwaldvogel.mongo.backend.AbstractMongoCollection
de.bwaldvogel.mongo.backend.AbstractMongoCollection.FindAndModifyPlanExecutorError -
Field Summary
Fields inherited from class de.bwaldvogel.mongo.backend.AbstractMongoCollection
cursorRegistry, options -
Constructor Summary
ConstructorsConstructorDescriptionMemoryCollection(de.bwaldvogel.mongo.MongoDatabase database, String collectionName, de.bwaldvogel.mongo.backend.CollectionOptions options, de.bwaldvogel.mongo.backend.CursorRegistry cursorRegistry) -
Method Summary
Modifier and TypeMethodDescriptionprotected IntegeraddDocumentInternal(de.bwaldvogel.mongo.bson.Document document) intcount()protected IntegerfindDocumentPosition(de.bwaldvogel.mongo.bson.Document document) protected intprotected de.bwaldvogel.mongo.bson.DocumentgetDocument(Integer position) protected voidhandleUpdate(Integer position, de.bwaldvogel.mongo.bson.Document oldDocument, de.bwaldvogel.mongo.bson.Document newDocument) booleanisEmpty()protected de.bwaldvogel.mongo.backend.QueryResultmatchDocuments(de.bwaldvogel.mongo.bson.Document query, de.bwaldvogel.mongo.bson.Document orderBy, int numberToSkip, int limit, int batchSize, de.bwaldvogel.mongo.bson.Document fieldSelector) protected voidremoveDocument(Integer position) protected voidupdateDataSize(int sizeDelta) Methods inherited from class de.bwaldvogel.mongo.backend.AbstractSynchronizedMongoCollection
addDocument, addDocuments, deleteDocuments, findAndModify, handleDistinct, handleQuery, insertDocuments, removeDocument, renameTo, updateDocumentsMethods inherited from class de.bwaldvogel.mongo.backend.AbstractMongoCollection
addIndex, count, createCursor, createQueryResult, deriveComparator, documentMatchesQuery, drop, dropIndex, getCollectionName, getDatabase, getIdField, getIndexes, getStats, getUuid, isNaturalDescending, matchDocuments, matchDocumentsFromStream, matchDocumentsFromStream, queryDocuments, toString, tracksDataSize, validateMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface de.bwaldvogel.mongo.MongoCollection
addDocumentIfMissing, deleteDocuments, getDatabaseName, getFullName, getNumIndexes, handleQuery, handleQuery, handleQueryAsStream, insertDocuments, queryAll, queryAllAsStream
-
Constructor Details
-
MemoryCollection
public MemoryCollection(de.bwaldvogel.mongo.MongoDatabase database, String collectionName, de.bwaldvogel.mongo.backend.CollectionOptions options, de.bwaldvogel.mongo.backend.CursorRegistry cursorRegistry)
-
-
Method Details
-
updateDataSize
protected void updateDataSize(int sizeDelta) - Specified by:
updateDataSizein classde.bwaldvogel.mongo.backend.AbstractMongoCollection<Integer>
-
getDataSize
protected int getDataSize()- Specified by:
getDataSizein classde.bwaldvogel.mongo.backend.AbstractMongoCollection<Integer>
-
addDocumentInternal
- Specified by:
addDocumentInternalin classde.bwaldvogel.mongo.backend.AbstractMongoCollection<Integer>
-
matchDocuments
protected de.bwaldvogel.mongo.backend.QueryResult matchDocuments(de.bwaldvogel.mongo.bson.Document query, de.bwaldvogel.mongo.bson.Document orderBy, int numberToSkip, int limit, int batchSize, de.bwaldvogel.mongo.bson.Document fieldSelector) - Specified by:
matchDocumentsin classde.bwaldvogel.mongo.backend.AbstractMongoCollection<Integer>
-
count
public int count() -
isEmpty
public boolean isEmpty() -
findDocumentPosition
- Overrides:
findDocumentPositionin classde.bwaldvogel.mongo.backend.AbstractMongoCollection<Integer>
-
streamAllDocumentsWithPosition
protected Stream<de.bwaldvogel.mongo.backend.DocumentWithPosition<Integer>> streamAllDocumentsWithPosition()- Specified by:
streamAllDocumentsWithPositionin classde.bwaldvogel.mongo.backend.AbstractMongoCollection<Integer>
-
removeDocument
- Specified by:
removeDocumentin classde.bwaldvogel.mongo.backend.AbstractMongoCollection<Integer>
-
getDocument
- Specified by:
getDocumentin classde.bwaldvogel.mongo.backend.AbstractMongoCollection<Integer>
-
handleUpdate
protected void handleUpdate(Integer position, de.bwaldvogel.mongo.bson.Document oldDocument, de.bwaldvogel.mongo.bson.Document newDocument) - Specified by:
handleUpdatein classde.bwaldvogel.mongo.backend.AbstractMongoCollection<Integer>
-