Skip to content

Commit 6e828e6

Browse files
committed
Remove dead async callback code
1 parent 7b1904d commit 6e828e6

File tree

2 files changed

+0
-54
lines changed

2 files changed

+0
-54
lines changed

driver-core/src/main/com/mongodb/internal/async/client/AsyncClientSession.java

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
package com.mongodb.internal.async.client;
1818

1919
import com.mongodb.TransactionOptions;
20-
import com.mongodb.internal.async.SingleResultCallback;
2120

2221
/**
2322
* A client session that supports transactions.
@@ -47,38 +46,4 @@ public interface AsyncClientSession extends com.mongodb.session.ClientSession {
4746
* @return the transaction options
4847
*/
4948
TransactionOptions getTransactionOptions();
50-
51-
/**
52-
* Start a transaction in the context of this session with default transaction options. A transaction can not be started if there is
53-
* already an active transaction on this session.
54-
*
55-
* @mongodb.server.release 4.0
56-
*/
57-
void startTransaction();
58-
59-
/**
60-
* Start a transaction in the context of this session with the given transaction options. A transaction can not be started if there is
61-
* already an active transaction on this session.
62-
*
63-
* @param transactionOptions the options to apply to the transaction
64-
*
65-
* @mongodb.server.release 4.0
66-
*/
67-
void startTransaction(TransactionOptions transactionOptions);
68-
69-
/**
70-
* Commit a transaction in the context of this session. A transaction can only be commmited if one has first been started.
71-
*
72-
* @param callback the result callback
73-
* @mongodb.server.release 4.0
74-
*/
75-
void commitTransaction(SingleResultCallback<Void> callback);
76-
77-
/**
78-
* Abort a transaction in the context of this session. A transaction can only be aborted if one has first been started.
79-
*
80-
* @param callback the result callback
81-
* @mongodb.server.release 4.0
82-
*/
83-
void abortTransaction(SingleResultCallback<Void> callback);
8449
}

driver-reactive-streams/src/main/com/mongodb/reactivestreams/client/internal/ClientSessionPublisherImpl.java

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
import com.mongodb.ReadConcern;
2424
import com.mongodb.TransactionOptions;
2525
import com.mongodb.WriteConcern;
26-
import com.mongodb.internal.async.SingleResultCallback;
2726
import com.mongodb.internal.async.client.AsyncClientSession;
2827
import com.mongodb.internal.operation.AbortTransactionOperation;
2928
import com.mongodb.internal.operation.AsyncReadOperation;
@@ -125,24 +124,6 @@ public void startTransaction(final TransactionOptions transactionOptions) {
125124
clearTransactionContext();
126125
}
127126

128-
@Override
129-
public void commitTransaction(final SingleResultCallback<Void> callback) {
130-
try {
131-
Mono.from(commitTransaction()).subscribe(s -> callback.onResult(s, null), e -> callback.onResult(null, e));
132-
} catch (Throwable t) {
133-
callback.onResult(null, t);
134-
}
135-
}
136-
137-
@Override
138-
public void abortTransaction(final SingleResultCallback<Void> callback) {
139-
try {
140-
Mono.from(abortTransaction()).subscribe(s -> callback.onResult(s, null), e -> callback.onResult(null, e));
141-
} catch (Throwable t) {
142-
callback.onResult(null, t);
143-
}
144-
}
145-
146127
@Override
147128
public AsyncClientSession getWrapped() {
148129
return this;

0 commit comments

Comments
 (0)