Package com.mongodb
Class Bytes
java.lang.Object
org.bson.BSON
com.mongodb.Bytes
Deprecated.
there is no replacement for this class
Class that hold definitions of the wire protocol
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ByteOrder
Deprecated.Little-endianstatic final int
Deprecated.Use with TailableCursor.static final int
Deprecated.Stream the data down full blast in multiple "more" packages, on the assumption that the client will fully read all data queried.static final int
Deprecated.The server normally times out idle cursors after an inactivity period (10 minutes) to prevent excess memory use.static final int
Deprecated.Internal replication use only - driver should not setstatic final int
Deprecated.Use with sharding (mongos).static final int
Deprecated.When turned on, read queries will be directed to slave servers instead of the primary server.static final int
Deprecated.Tailable means cursor is not closed when the last data is retrieved.static final int
Deprecated.Set when the server supports the AwaitData Query option.static final int
Deprecated.Set when getMore is called but the cursor id is not valid at the server.static final int
Deprecated.Set when query failed.static final int
Deprecated.Drivers should ignore this. -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.bson.BSON
addDecodingHook, addEncodingHook, applyDecodingHooks, applyEncodingHooks, clearAllHooks, clearDecodingHooks, clearEncodingHooks, decode, encode, getDecodingHooks, getEncodingHooks, hasDecodeHooks, hasEncodeHooks, regexFlag, regexFlags, regexFlags, removeDecodingHook, removeDecodingHooks, removeEncodingHook, removeEncodingHooks, toInt
-
Field Details
-
ORDER
Deprecated.Little-endian -
QUERYOPTION_TAILABLE
public static final int QUERYOPTION_TAILABLEDeprecated.Tailable means cursor is not closed when the last data is retrieved. Rather, the cursor marks the final object's position. You can resume using the cursor later, from where it was located, if more data were received. Like any "latent cursor", the cursor may become invalid at some point (CursorNotFound) - for example if the final object it references were deleted.- See Also:
-
QUERYOPTION_SLAVEOK
public static final int QUERYOPTION_SLAVEOKDeprecated.When turned on, read queries will be directed to slave servers instead of the primary server.- See Also:
-
QUERYOPTION_OPLOGREPLAY
public static final int QUERYOPTION_OPLOGREPLAYDeprecated.Internal replication use only - driver should not set- See Also:
-
QUERYOPTION_NOTIMEOUT
public static final int QUERYOPTION_NOTIMEOUTDeprecated.The server normally times out idle cursors after an inactivity period (10 minutes) to prevent excess memory use. Set this option to prevent that.- See Also:
-
QUERYOPTION_AWAITDATA
public static final int QUERYOPTION_AWAITDATADeprecated.Use with TailableCursor. If we are at the end of the data, block for a while rather than returning no data. After a timeout period, we do return as normal.- See Also:
-
QUERYOPTION_EXHAUST
public static final int QUERYOPTION_EXHAUSTDeprecated.Stream the data down full blast in multiple "more" packages, on the assumption that the client will fully read all data queried. Faster when you are pulling a lot of data and know you want to pull it all down. Note: the client is not allowed to not read all the data unless it closes the connection.- See Also:
-
QUERYOPTION_PARTIAL
public static final int QUERYOPTION_PARTIALDeprecated.Use with sharding (mongos). Allows partial results from a sharded system if any shards are down/missing from the cluster. If not used an error will be returned from the mongos server.- See Also:
-
RESULTFLAG_CURSORNOTFOUND
public static final int RESULTFLAG_CURSORNOTFOUNDDeprecated.Set when getMore is called but the cursor id is not valid at the server. Returned with zero results.- See Also:
-
RESULTFLAG_ERRSET
public static final int RESULTFLAG_ERRSETDeprecated.Set when query failed. Results consist of one document containing an "$err" field describing the failure.- See Also:
-
RESULTFLAG_SHARDCONFIGSTALE
public static final int RESULTFLAG_SHARDCONFIGSTALEDeprecated.Drivers should ignore this. Only mongos will ever see this set, in which case, it needs to update config from the server.- See Also:
-
RESULTFLAG_AWAITCAPABLE
public static final int RESULTFLAG_AWAITCAPABLEDeprecated.Set when the server supports the AwaitData Query option. If it doesn't, a client should sleep a little between getMore's of a Tailable cursor. Mongod version 1.6 supports AwaitData and thus always sets AwaitCapable.- See Also:
-
-
Constructor Details
-
Bytes
public Bytes()Deprecated.
-
-
Method Details
-
getType
Deprecated.Gets the type byte for a given object.- Parameters:
object
- the object- Returns:
- the byte value associated with the type, or -1 if no type is matched
-