Package com.mongodb.connection
Class SplittablePayload
- java.lang.Object
-
- com.mongodb.connection.SplittablePayload
-
@Deprecated public final class SplittablePayload extends java.lang.Object
Deprecated.A Splittable payload for write commands.The command will consume as much of the payload as possible. The
hasAnotherSplit()
method will return true if there is another split to consume,getNextSplit()
method will return the next SplittablePayload.- Since:
- 3.6
- See Also:
Connection.command(String, org.bson.BsonDocument, org.bson.FieldNameValidator, com.mongodb.ReadPreference, org.bson.codecs.Decoder, com.mongodb.session.SessionContext, boolean, com.mongodb.connection.SplittablePayload, org.bson.FieldNameValidator)
,AsyncConnection.commandAsync(String, org.bson.BsonDocument, org.bson.FieldNameValidator, com.mongodb.ReadPreference, org.bson.codecs.Decoder, com.mongodb.session.SessionContext, boolean, com.mongodb.connection.SplittablePayload, org.bson.FieldNameValidator, com.mongodb.async.SingleResultCallback)
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SplittablePayload.Type
Deprecated.The type of the payload.
-
Constructor Summary
Constructors Constructor Description SplittablePayload(SplittablePayload.Type payloadType, java.util.List<BsonDocument> payload)
Deprecated.Create a new instance
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description SplittablePayload
getNextSplit()
Deprecated.java.util.List<BsonDocument>
getPayload()
Deprecated.java.lang.String
getPayloadName()
Deprecated.SplittablePayload.Type
getPayloadType()
Deprecated.int
getPosition()
Deprecated.boolean
hasAnotherSplit()
Deprecated.boolean
isEmpty()
Deprecated.void
setPosition(int position)
Deprecated.Sets the current position in the payload
-
-
-
Constructor Detail
-
SplittablePayload
public SplittablePayload(SplittablePayload.Type payloadType, java.util.List<BsonDocument> payload)
Deprecated.Create a new instance- Parameters:
payloadType
- the payload typepayload
- the payload
-
-
Method Detail
-
getPayloadType
public SplittablePayload.Type getPayloadType()
Deprecated.- Returns:
- the payload type
-
getPayloadName
public java.lang.String getPayloadName()
Deprecated.- Returns:
- the payload name
-
getPayload
public java.util.List<BsonDocument> getPayload()
Deprecated.- Returns:
- the payload
-
getPosition
public int getPosition()
Deprecated.- Returns:
- the current position in the payload
-
setPosition
public void setPosition(int position)
Deprecated.Sets the current position in the payload- Parameters:
position
- the position
-
hasAnotherSplit
public boolean hasAnotherSplit()
Deprecated.- Returns:
- true if there are more values after the current position
-
getNextSplit
public SplittablePayload getNextSplit()
Deprecated.- Returns:
- a new SplittablePayload containing only the values after the current position.
-
isEmpty
public boolean isEmpty()
Deprecated.- Returns:
- true if the payload is empty
-
-