Package com.mongodb
Class LazyDBObject
- java.lang.Object
-
- org.bson.LazyBSONObject
-
- com.mongodb.LazyDBObject
-
- All Implemented Interfaces:
DBObject
,BSONObject
@Immutable @Deprecated(since="2021-05-27") public class LazyDBObject extends LazyBSONObject implements DBObject
Deprecated.Usage of this API is not supported in AEM as a Cloud Service.An immutableDBObject
backed by a byte buffer that lazily provides keys and values on request. This is useful for transferring BSON documents between servers when you don't want to pay the performance penalty of encoding or decoding them fully.
-
-
Constructor Summary
Constructors Constructor Description LazyDBObject(byte[] bytes, int offset, LazyBSONCallback callback)
Deprecated.Construct an instance.LazyDBObject(byte[] bytes, LazyBSONCallback callback)
Deprecated.Construct an instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description boolean
isPartialObject()
Deprecated.WhetherDBObject.markAsPartialObject()
was ever called only matters if you are going to upsert and do not want to risk losing fields.void
markAsPartialObject()
Deprecated.If this object was retrieved with only some fields (using a field filter) this method will be called to mark it as such.java.lang.String
toString()
Deprecated.Returns a JSON serialization of this object-
Methods inherited from class org.bson.LazyBSONObject
containsField, containsKey, entrySet, equals, get, getBSONSize, hashCode, isEmpty, keySet, pipe, put, putAll, putAll, removeField, toMap
-
Methods inherited from interface org.bson.BSONObject
containsField, containsKey, get, keySet, put, putAll, putAll, removeField, toMap
-
-
-
-
Constructor Detail
-
LazyDBObject
public LazyDBObject(byte[] bytes, LazyBSONCallback callback)
Deprecated.Construct an instance.- Parameters:
bytes
- the raw bytescallback
- the callback to use to construct nested values
-
LazyDBObject
public LazyDBObject(byte[] bytes, int offset, LazyBSONCallback callback)
Deprecated.Construct an instance.- Parameters:
bytes
- the raw bytesoffset
- the offset into the raw bytescallback
- the callback to use to construct nested values
-
-
Method Detail
-
markAsPartialObject
public void markAsPartialObject()
Deprecated.Description copied from interface:DBObject
If this object was retrieved with only some fields (using a field filter) this method will be called to mark it as such.- Specified by:
markAsPartialObject
in interfaceDBObject
-
isPartialObject
public boolean isPartialObject()
Deprecated.Description copied from interface:DBObject
WhetherDBObject.markAsPartialObject()
was ever called only matters if you are going to upsert and do not want to risk losing fields.- Specified by:
isPartialObject
in interfaceDBObject
- Returns:
- true if this has been marked as a partial object
-
toString
public java.lang.String toString()
Deprecated.Returns a JSON serialization of this object- Overrides:
toString
in classjava.lang.Object
- Returns:
- JSON serialization
-
-