Package de.caluga.morphium.driver.wire
Class SingleMongoConnection
java.lang.Object
de.caluga.morphium.driver.wire.SingleMongoConnection
- All Implemented Interfaces:
MongoConnection,Closeable,AutoCloseable
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()voidconnect(MorphiumDriver drv, String host, int port) getAnswerFor(int queryId, int batchSize) intgetReplyFor(int msgid, long timeout) intgetStats()booleankillCursors(String db, String coll, long... ids) readAnswerFor(int queryId) readSingleAnswer(int id) voidrelease()booleanreplyAvailableFor(int msgId) intsendCommand(MongoCommand cmd) voidvoidsetCredentials(String authDb, String userName, String password) voidwatch(WatchCommand command)
-
Constructor Details
-
SingleMongoConnection
public SingleMongoConnection()
-
-
Method Details
-
setCredentials
- Specified by:
setCredentialsin interfaceMongoConnection
-
connect
public HelloResult connect(MorphiumDriver drv, String host, int port) throws MorphiumDriverException - Specified by:
connectin interfaceMongoConnection- Throws:
MorphiumDriverException
-
getDriver
- Specified by:
getDriverin interfaceMongoConnection
-
setDriver
-
getStats
-
getConnectedTo
- Specified by:
getConnectedToin interfaceMongoConnection
-
getConnectedToHost
- Specified by:
getConnectedToHostin interfaceMongoConnection
-
getConnectedToPort
public int getConnectedToPort()- Specified by:
getConnectedToPortin interfaceMongoConnection
-
closeIteration
- Specified by:
closeIterationin interfaceMongoConnection- Throws:
MorphiumDriverException
-
killCursors
public Map<String,Object> killCursors(String db, String coll, long... ids) throws MorphiumDriverException - Specified by:
killCursorsin interfaceMongoConnection- Throws:
MorphiumDriverException
-
isConnected
public boolean isConnected()- Specified by:
isConnectedin interfaceMongoConnection
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceMongoConnection
-
release
public void release()- Specified by:
releasein interfaceMongoConnection
-
replyAvailableFor
public boolean replyAvailableFor(int msgId) - Specified by:
replyAvailableForin interfaceMongoConnection
-
getReplyFor
- Specified by:
getReplyForin interfaceMongoConnection- Throws:
MorphiumDriverException
-
sendQuery
- Throws:
MorphiumDriverException
-
sendAndWaitForReply
- Throws:
MorphiumDriverException
-
readSingleAnswer
- Specified by:
readSingleAnswerin interfaceMongoConnection- Throws:
MorphiumDriverException
-
sendCommand
- Specified by:
sendCommandin interfaceMongoConnection- Throws:
MorphiumDriverException
-
getSourcePort
public int getSourcePort()- Specified by:
getSourcePortin interfaceMongoConnection
-
watch
- Specified by:
watchin interfaceMongoConnection- Throws:
MorphiumDriverException
-
readAnswerFor
- Specified by:
readAnswerForin interfaceMongoConnection- Throws:
MorphiumDriverException
-
getAnswerFor
- Specified by:
getAnswerForin interfaceMongoConnection- Throws:
MorphiumDriverException
-
readAnswerFor
- Specified by:
readAnswerForin interfaceMongoConnection- Throws:
MorphiumDriverException
-