Package de.bwaldvogel.mongo.backend
Class AbstractMongoBackend
- java.lang.Object
-
- de.bwaldvogel.mongo.backend.AbstractMongoBackend
-
- All Implemented Interfaces:
MongoBackend
public abstract class AbstractMongoBackend extends java.lang.Object implements MongoBackend
-
-
Constructor Summary
Constructors Constructor Description AbstractMongoBackend()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voiddropDatabase(java.lang.String databaseName)java.time.ClockgetClock()java.util.Collection<Document>getCurrentOperations(MongoQuery query)java.util.List<java.lang.Integer>getVersion()voidhandleClose(io.netty.channel.Channel channel)DocumenthandleCommand(io.netty.channel.Channel channel, java.lang.String databaseName, java.lang.String command, Document query)voidhandleDelete(MongoDelete delete)voidhandleInsert(MongoInsert insert)java.lang.Iterable<Document>handleQuery(MongoQuery query)voidhandleUpdate(MongoUpdate update)protected java.util.Set<java.lang.String>listDatabaseNames()protected abstract MongoDatabaseopenOrCreateDatabase(java.lang.String databaseName)protected MongoDatabaseresolveDatabase(java.lang.String database)voidsetClock(java.time.Clock clock)voidsetVersion(int major, int minor, int patch)voidsetWireVersion(int maxWireVersion, int minWireVersion)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface de.bwaldvogel.mongo.MongoBackend
close
-
-
-
-
Method Detail
-
resolveDatabase
protected MongoDatabase resolveDatabase(java.lang.String database)
-
listDatabaseNames
protected java.util.Set<java.lang.String> listDatabaseNames()
-
openOrCreateDatabase
protected abstract MongoDatabase openOrCreateDatabase(java.lang.String databaseName)
-
handleCommand
public Document handleCommand(io.netty.channel.Channel channel, java.lang.String databaseName, java.lang.String command, Document query)
- Specified by:
handleCommandin interfaceMongoBackend
-
getCurrentOperations
public java.util.Collection<Document> getCurrentOperations(MongoQuery query)
- Specified by:
getCurrentOperationsin interfaceMongoBackend
-
handleQuery
public java.lang.Iterable<Document> handleQuery(MongoQuery query)
- Specified by:
handleQueryin interfaceMongoBackend
-
handleInsert
public void handleInsert(MongoInsert insert)
- Specified by:
handleInsertin interfaceMongoBackend
-
handleDelete
public void handleDelete(MongoDelete delete)
- Specified by:
handleDeletein interfaceMongoBackend
-
handleUpdate
public void handleUpdate(MongoUpdate update)
- Specified by:
handleUpdatein interfaceMongoBackend
-
dropDatabase
public void dropDatabase(java.lang.String databaseName)
- Specified by:
dropDatabasein interfaceMongoBackend
-
handleClose
public void handleClose(io.netty.channel.Channel channel)
- Specified by:
handleClosein interfaceMongoBackend
-
getVersion
public java.util.List<java.lang.Integer> getVersion()
- Specified by:
getVersionin interfaceMongoBackend
-
setVersion
public void setVersion(int major, int minor, int patch)
-
setWireVersion
public void setWireVersion(int maxWireVersion, int minWireVersion)
-
getClock
public java.time.Clock getClock()
- Specified by:
getClockin interfaceMongoBackend
-
setClock
public void setClock(java.time.Clock clock)
- Specified by:
setClockin interfaceMongoBackend
-
-