Klasse OpMsg
OP_MSG {
MsgHeader header; // standard message header
uint32 flagBits; // message flags
Sections[] sections; // data sections
optional
struct MsgHeader {
int32 messageLength; // total message size, including this
int32 requestID; // identifier for this message
int32 responseTo; // requestID from the original request
// (used in responses from db)
int32 opCode; // request type - see table below for details
}
section type 0 (BASIC):
byte 0;
BSON-Document
section type 1 (optimized):
byte 1;
int32 size
CString sequence id; //reference to insert, id is "documents"/ to update id "updates", to delete id is "deletes"
BSON-Documents
BSON-Document e.g: {insert: "test_coll", $db: "db", documents: [{_id: 1}]}
-
Verschachtelte Klassen - Übersicht
Von Klasse geerbte verschachtelte Klassen/Schnittstellen de.caluga.morphium.driver.wireprotocol.WireProtocolMessage
WireProtocolMessage.OpCode -
Feldübersicht
FelderModifizierer und TypFeldBeschreibungstatic final intstatic final intstatic final intstatic final int -
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungvoidintgetFlags()intbyte[]booleanvoidparsePayload(byte[] bytes, int offset) setFirstDoc(Map<String, Object> o) setFlags(int flags) Von Klasse geerbte Methoden de.caluga.morphium.driver.wireprotocol.WireProtocolMessage
bytes, getMessageId, getResponseTo, getSize, parseFromStream, readInt, readLong, readString, setMessageId, setResponseTo, setSize, strLen, writeInt, writeLong, writeString
-
Felddetails
-
OP_CODE
public static final int OP_CODE- Siehe auch:
-
CHECKSUM_PRESENT
public static final int CHECKSUM_PRESENT- Siehe auch:
-
MORE_TO_COME
public static final int MORE_TO_COME- Siehe auch:
-
EXHAUST_ALLOWED
public static final int EXHAUST_ALLOWED- Siehe auch:
-
-
Konstruktordetails
-
OpMsg
public OpMsg()
-
-
Methodendetails
-
addDoc
-
getFirstDoc
-
setFirstDoc
-
getFlags
public int getFlags() -
setFlags
-
parsePayload
- Angegeben von:
parsePayloadin KlasseWireProtocolMessage- Löst aus:
IOException
-
getPayload
- Angegeben von:
getPayloadin KlasseWireProtocolMessage- Löst aus:
IOException
-
getOpCode
public int getOpCode()- Angegeben von:
getOpCodein KlasseWireProtocolMessage
-
hasCursor
public boolean hasCursor()
-