@Override public long advanceTransactionNumber() { return wrapped.advanceTransactionNumber(); }
private BulkWriteBatch(final MongoNamespace namespace, final ConnectionDescription connectionDescription, final boolean ordered, final WriteConcern writeConcern, final Boolean bypassDocumentValidation, final boolean retryWrites, final BulkWriteBatchCombiner bulkWriteBatchCombiner, final IndexMap indexMap, final WriteRequest.Type batchType, final BsonDocument command, final SplittablePayload payload, final List<WriteRequestWithIndex> unprocessed, final SessionContext sessionContext) { this.namespace = namespace; this.connectionDescription = connectionDescription; this.ordered = ordered; this.writeConcern = writeConcern; this.bypassDocumentValidation = bypassDocumentValidation; this.bulkWriteBatchCombiner = bulkWriteBatchCombiner; this.indexMap = indexMap; this.batchType = batchType; this.payload = payload; this.unprocessed = unprocessed; this.retryWrites = retryWrites; this.sessionContext = sessionContext; if (retryWrites) { command.put("txnNumber", new BsonInt64(sessionContext.advanceTransactionNumber())); } this.command = command; }
protected void addTxnNumberToCommand(final ServerDescription serverDescription, final ConnectionDescription connectionDescription, final BsonDocument commandDocument, final SessionContext sessionContext) { if (isRetryableWrite(isRetryWrites(), getWriteConcern(), serverDescription, connectionDescription, sessionContext)) { commandDocument.put("txnNumber", new BsonInt64(sessionContext.advanceTransactionNumber())); } }
command.put("txnNumber", new BsonInt64(sessionContext.advanceTransactionNumber()));
@Override public long advanceTransactionNumber() { return wrapped.advanceTransactionNumber(); }
private BulkWriteBatch(final MongoNamespace namespace, final ConnectionDescription connectionDescription, final boolean ordered, final WriteConcern writeConcern, final Boolean bypassDocumentValidation, final boolean retryWrites, final BulkWriteBatchCombiner bulkWriteBatchCombiner, final IndexMap indexMap, final WriteRequest.Type batchType, final BsonDocument command, final SplittablePayload payload, final List<WriteRequestWithIndex> unprocessed, final SessionContext sessionContext) { this.namespace = namespace; this.connectionDescription = connectionDescription; this.ordered = ordered; this.writeConcern = writeConcern; this.bypassDocumentValidation = bypassDocumentValidation; this.bulkWriteBatchCombiner = bulkWriteBatchCombiner; this.indexMap = indexMap; this.batchType = batchType; this.payload = payload; this.unprocessed = unprocessed; this.retryWrites = retryWrites; this.sessionContext = sessionContext; if (retryWrites) { command.put("txnNumber", new BsonInt64(sessionContext.advanceTransactionNumber())); } this.command = command; }
protected void addTxnNumberToCommand(final ServerDescription serverDescription, final ConnectionDescription connectionDescription, final BsonDocument commandDocument, final SessionContext sessionContext) { if (isRetryableWrite(isRetryWrites(), getWriteConcern(), serverDescription, connectionDescription, sessionContext)) { commandDocument.put("txnNumber", new BsonInt64(sessionContext.advanceTransactionNumber())); } }
command.put("txnNumber", new BsonInt64(sessionContext.advanceTransactionNumber()));