final class com.mongodb.client.internal.ClientSessionImpl extends com.mongodb.internal.session.BaseClientSessionImpl implements com.mongodb.client.ClientSession
minor version: 0
major version: 59
flags: flags: (0x0030) ACC_FINAL, ACC_SUPER
this_class: com.mongodb.client.internal.ClientSessionImpl
super_class: com.mongodb.internal.session.BaseClientSessionImpl
{
private static final int MAX_RETRY_TIME_LIMIT_MS;
descriptor: I
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: 120000
private final com.mongodb.client.internal.MongoClientDelegate delegate;
descriptor: Lcom/mongodb/client/internal/MongoClientDelegate;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private com.mongodb.client.internal.ClientSessionImpl$TransactionState transactionState;
descriptor: Lcom/mongodb/client/internal/ClientSessionImpl$TransactionState;
flags: (0x0002) ACC_PRIVATE
private boolean messageSentInCurrentTransaction;
descriptor: Z
flags: (0x0002) ACC_PRIVATE
private boolean commitInProgress;
descriptor: Z
flags: (0x0002) ACC_PRIVATE
private com.mongodb.TransactionOptions transactionOptions;
descriptor: Lcom/mongodb/TransactionOptions;
flags: (0x0002) ACC_PRIVATE
void <init>(com.mongodb.internal.session.ServerSessionPool, java.lang.Object, com.mongodb.ClientSessionOptions, com.mongodb.client.internal.MongoClientDelegate);
descriptor: (Lcom/mongodb/internal/session/ServerSessionPool;Ljava/lang/Object;Lcom/mongodb/ClientSessionOptions;Lcom/mongodb/client/internal/MongoClientDelegate;)V
flags: (0x0000)
Code:
stack=4, locals=5, args_size=5
start local 0 start local 1 start local 2 start local 3 start local 4 0: aload 0
aload 1
aload 2
aload 3
invokespecial com.mongodb.internal.session.BaseClientSessionImpl.<init>:(Lcom/mongodb/internal/session/ServerSessionPool;Ljava/lang/Object;Lcom/mongodb/ClientSessionOptions;)V
1: aload 0
getstatic com.mongodb.client.internal.ClientSessionImpl$TransactionState.NONE:Lcom/mongodb/client/internal/ClientSessionImpl$TransactionState;
putfield com.mongodb.client.internal.ClientSessionImpl.transactionState:Lcom/mongodb/client/internal/ClientSessionImpl$TransactionState;
2: aload 0
aload 4
putfield com.mongodb.client.internal.ClientSessionImpl.delegate:Lcom/mongodb/client/internal/MongoClientDelegate;
3: return
end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Lcom/mongodb/client/internal/ClientSessionImpl;
0 4 1 serverSessionPool Lcom/mongodb/internal/session/ServerSessionPool;
0 4 2 originator Ljava/lang/Object;
0 4 3 options Lcom/mongodb/ClientSessionOptions;
0 4 4 delegate Lcom/mongodb/client/internal/MongoClientDelegate;
MethodParameters:
Name Flags
serverSessionPool final
originator final
options final
delegate final
public boolean hasActiveTransaction();
descriptor: ()Z
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
getfield com.mongodb.client.internal.ClientSessionImpl.transactionState:Lcom/mongodb/client/internal/ClientSessionImpl$TransactionState;
getstatic com.mongodb.client.internal.ClientSessionImpl$TransactionState.IN:Lcom/mongodb/client/internal/ClientSessionImpl$TransactionState;
if_acmpeq 2
aload 0
getfield com.mongodb.client.internal.ClientSessionImpl.transactionState:Lcom/mongodb/client/internal/ClientSessionImpl$TransactionState;
getstatic com.mongodb.client.internal.ClientSessionImpl$TransactionState.COMMITTED:Lcom/mongodb/client/internal/ClientSessionImpl$TransactionState;
if_acmpne 1
aload 0
getfield com.mongodb.client.internal.ClientSessionImpl.commitInProgress:Z
ifne 2
StackMap locals:
StackMap stack:
1: iconst_0
ireturn
StackMap locals:
StackMap stack:
2: iconst_1
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lcom/mongodb/client/internal/ClientSessionImpl;
public boolean notifyMessageSent();
descriptor: ()Z
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=1
start local 0 0: aload 0
invokevirtual com.mongodb.client.internal.ClientSessionImpl.hasActiveTransaction:()Z
ifeq 6
1: aload 0
getfield com.mongodb.client.internal.ClientSessionImpl.messageSentInCurrentTransaction:Z
ifeq 2
iconst_0
goto 3
StackMap locals:
StackMap stack:
2: iconst_1
StackMap locals:
StackMap stack: int
3: istore 1
start local 1 4: aload 0
iconst_1
putfield com.mongodb.client.internal.ClientSessionImpl.messageSentInCurrentTransaction:Z
5: iload 1
ireturn
end local 1 6: StackMap locals:
StackMap stack:
aload 0
getfield com.mongodb.client.internal.ClientSessionImpl.transactionState:Lcom/mongodb/client/internal/ClientSessionImpl$TransactionState;
getstatic com.mongodb.client.internal.ClientSessionImpl$TransactionState.COMMITTED:Lcom/mongodb/client/internal/ClientSessionImpl$TransactionState;
if_acmpeq 7
aload 0
getfield com.mongodb.client.internal.ClientSessionImpl.transactionState:Lcom/mongodb/client/internal/ClientSessionImpl$TransactionState;
getstatic com.mongodb.client.internal.ClientSessionImpl$TransactionState.ABORTED:Lcom/mongodb/client/internal/ClientSessionImpl$TransactionState;
if_acmpne 8
7: StackMap locals:
StackMap stack:
aload 0
getstatic com.mongodb.client.internal.ClientSessionImpl$TransactionState.NONE:Lcom/mongodb/client/internal/ClientSessionImpl$TransactionState;
invokevirtual com.mongodb.client.internal.ClientSessionImpl.cleanupTransaction:(Lcom/mongodb/client/internal/ClientSessionImpl$TransactionState;)V
8: StackMap locals:
StackMap stack:
iconst_0
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 9 0 this Lcom/mongodb/client/internal/ClientSessionImpl;
4 6 1 firstMessageInCurrentTransaction Z
public com.mongodb.TransactionOptions getTransactionOptions();
descriptor: ()Lcom/mongodb/TransactionOptions;
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=1, args_size=1
start local 0 0: ldc "in transaction"
aload 0
getfield com.mongodb.client.internal.ClientSessionImpl.transactionState:Lcom/mongodb/client/internal/ClientSessionImpl$TransactionState;
getstatic com.mongodb.client.internal.ClientSessionImpl$TransactionState.IN:Lcom/mongodb/client/internal/ClientSessionImpl$TransactionState;
if_acmpeq 1
aload 0
getfield com.mongodb.client.internal.ClientSessionImpl.transactionState:Lcom/mongodb/client/internal/ClientSessionImpl$TransactionState;
getstatic com.mongodb.client.internal.ClientSessionImpl$TransactionState.COMMITTED:Lcom/mongodb/client/internal/ClientSessionImpl$TransactionState;
if_acmpeq 1
iconst_0
goto 2
StackMap locals:
StackMap stack: java.lang.String
1: iconst_1
StackMap locals: com.mongodb.client.internal.ClientSessionImpl
StackMap stack: java.lang.String int
2: invokestatic com.mongodb.assertions.Assertions.isTrue:(Ljava/lang/String;Z)V
3: aload 0
getfield com.mongodb.client.internal.ClientSessionImpl.transactionOptions:Lcom/mongodb/TransactionOptions;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Lcom/mongodb/client/internal/ClientSessionImpl;
public void startTransaction();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
invokestatic com.mongodb.TransactionOptions.builder:()Lcom/mongodb/TransactionOptions$Builder;
invokevirtual com.mongodb.TransactionOptions$Builder.build:()Lcom/mongodb/TransactionOptions;
invokevirtual com.mongodb.client.internal.ClientSessionImpl.startTransaction:(Lcom/mongodb/TransactionOptions;)V
1: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lcom/mongodb/client/internal/ClientSessionImpl;
public void startTransaction(com.mongodb.TransactionOptions);
descriptor: (Lcom/mongodb/TransactionOptions;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=3, args_size=2
start local 0 start local 1 0: ldc "transactionOptions"
aload 1
invokestatic com.mongodb.assertions.Assertions.notNull:(Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/Object;
pop
1: aload 0
getfield com.mongodb.client.internal.ClientSessionImpl.transactionState:Lcom/mongodb/client/internal/ClientSessionImpl$TransactionState;
getstatic com.mongodb.client.internal.ClientSessionImpl$TransactionState.IN:Lcom/mongodb/client/internal/ClientSessionImpl$TransactionState;
if_acmpne 3
2: new java.lang.IllegalStateException
dup
ldc "Transaction already in progress"
invokespecial java.lang.IllegalStateException.<init>:(Ljava/lang/String;)V
athrow
3: StackMap locals:
StackMap stack:
aload 0
getfield com.mongodb.client.internal.ClientSessionImpl.transactionState:Lcom/mongodb/client/internal/ClientSessionImpl$TransactionState;
getstatic com.mongodb.client.internal.ClientSessionImpl$TransactionState.COMMITTED:Lcom/mongodb/client/internal/ClientSessionImpl$TransactionState;
if_acmpne 6
4: aload 0
getstatic com.mongodb.client.internal.ClientSessionImpl$TransactionState.IN:Lcom/mongodb/client/internal/ClientSessionImpl$TransactionState;
invokevirtual com.mongodb.client.internal.ClientSessionImpl.cleanupTransaction:(Lcom/mongodb/client/internal/ClientSessionImpl$TransactionState;)V
5: goto 7
6: StackMap locals:
StackMap stack:
aload 0
getstatic com.mongodb.client.internal.ClientSessionImpl$TransactionState.IN:Lcom/mongodb/client/internal/ClientSessionImpl$TransactionState;
putfield com.mongodb.client.internal.ClientSessionImpl.transactionState:Lcom/mongodb/client/internal/ClientSessionImpl$TransactionState;
7: StackMap locals:
StackMap stack:
aload 0
invokevirtual com.mongodb.client.internal.ClientSessionImpl.getServerSession:()Lcom/mongodb/session/ServerSession;
invokeinterface com.mongodb.session.ServerSession.advanceTransactionNumber:()J
pop2
8: aload 0
aload 1
aload 0
invokevirtual com.mongodb.client.internal.ClientSessionImpl.getOptions:()Lcom/mongodb/ClientSessionOptions;
invokevirtual com.mongodb.ClientSessionOptions.getDefaultTransactionOptions:()Lcom/mongodb/TransactionOptions;
invokestatic com.mongodb.TransactionOptions.merge:(Lcom/mongodb/TransactionOptions;Lcom/mongodb/TransactionOptions;)Lcom/mongodb/TransactionOptions;
putfield com.mongodb.client.internal.ClientSessionImpl.transactionOptions:Lcom/mongodb/TransactionOptions;
9: aload 0
getfield com.mongodb.client.internal.ClientSessionImpl.transactionOptions:Lcom/mongodb/TransactionOptions;
invokevirtual com.mongodb.TransactionOptions.getWriteConcern:()Lcom/mongodb/WriteConcern;
astore 2
start local 2 10: aload 2
ifnonnull 12
11: new com.mongodb.MongoInternalException
dup
ldc "Invariant violated. Transaction options write concern can not be null"
invokespecial com.mongodb.MongoInternalException.<init>:(Ljava/lang/String;)V
athrow
12: StackMap locals: com.mongodb.WriteConcern
StackMap stack:
aload 2
invokevirtual com.mongodb.WriteConcern.isAcknowledged:()Z
ifne 14
13: new com.mongodb.MongoClientException
dup
ldc "Transactions do not support unacknowledged write concern"
invokespecial com.mongodb.MongoClientException.<init>:(Ljava/lang/String;)V
athrow
14: StackMap locals:
StackMap stack:
aload 0
aconst_null
invokevirtual com.mongodb.client.internal.ClientSessionImpl.setPinnedServerAddress:(Lcom/mongodb/ServerAddress;)V
15: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 16 0 this Lcom/mongodb/client/internal/ClientSessionImpl;
0 16 1 transactionOptions Lcom/mongodb/TransactionOptions;
10 16 2 writeConcern Lcom/mongodb/WriteConcern;
MethodParameters:
Name Flags
transactionOptions final
public void commitTransaction();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=6, locals=3, args_size=1
start local 0 0: aload 0
getfield com.mongodb.client.internal.ClientSessionImpl.transactionState:Lcom/mongodb/client/internal/ClientSessionImpl$TransactionState;
getstatic com.mongodb.client.internal.ClientSessionImpl$TransactionState.ABORTED:Lcom/mongodb/client/internal/ClientSessionImpl$TransactionState;
if_acmpne 2
1: new java.lang.IllegalStateException
dup
ldc "Cannot call commitTransaction after calling abortTransaction"
invokespecial java.lang.IllegalStateException.<init>:(Ljava/lang/String;)V
athrow
2: StackMap locals:
StackMap stack:
aload 0
getfield com.mongodb.client.internal.ClientSessionImpl.transactionState:Lcom/mongodb/client/internal/ClientSessionImpl$TransactionState;
getstatic com.mongodb.client.internal.ClientSessionImpl$TransactionState.NONE:Lcom/mongodb/client/internal/ClientSessionImpl$TransactionState;
if_acmpne 4
3: new java.lang.IllegalStateException
dup
ldc "There is no transaction started"
invokespecial java.lang.IllegalStateException.<init>:(Ljava/lang/String;)V
athrow
4: StackMap locals:
StackMap stack:
aload 0
getfield com.mongodb.client.internal.ClientSessionImpl.messageSentInCurrentTransaction:Z
ifeq 26
5: aload 0
getfield com.mongodb.client.internal.ClientSessionImpl.transactionOptions:Lcom/mongodb/TransactionOptions;
invokevirtual com.mongodb.TransactionOptions.getReadConcern:()Lcom/mongodb/ReadConcern;
astore 1
start local 1 6: aload 1
ifnonnull 8
7: new com.mongodb.MongoInternalException
dup
ldc "Invariant violated. Transaction options read concern can not be null"
invokespecial com.mongodb.MongoInternalException.<init>:(Ljava/lang/String;)V
athrow
8: StackMap locals: com.mongodb.ReadConcern
StackMap stack:
aload 0
iconst_1
putfield com.mongodb.client.internal.ClientSessionImpl.commitInProgress:Z
9: aload 0
getfield com.mongodb.client.internal.ClientSessionImpl.delegate:Lcom/mongodb/client/internal/MongoClientDelegate;
invokevirtual com.mongodb.client.internal.MongoClientDelegate.getOperationExecutor:()Lcom/mongodb/client/internal/OperationExecutor;
10: new com.mongodb.operation.CommitTransactionOperation
dup
aload 0
getfield com.mongodb.client.internal.ClientSessionImpl.transactionOptions:Lcom/mongodb/TransactionOptions;
invokevirtual com.mongodb.TransactionOptions.getWriteConcern:()Lcom/mongodb/WriteConcern;
11: aload 0
getfield com.mongodb.client.internal.ClientSessionImpl.transactionState:Lcom/mongodb/client/internal/ClientSessionImpl$TransactionState;
getstatic com.mongodb.client.internal.ClientSessionImpl$TransactionState.COMMITTED:Lcom/mongodb/client/internal/ClientSessionImpl$TransactionState;
if_acmpne 12
iconst_1
goto 13
StackMap locals: com.mongodb.client.internal.ClientSessionImpl com.mongodb.ReadConcern
StackMap stack: com.mongodb.client.internal.OperationExecutor new 10 new 10 com.mongodb.WriteConcern
12: iconst_0
StackMap locals: com.mongodb.client.internal.ClientSessionImpl com.mongodb.ReadConcern
StackMap stack: com.mongodb.client.internal.OperationExecutor new 10 new 10 com.mongodb.WriteConcern int
13: invokespecial com.mongodb.operation.CommitTransactionOperation.<init>:(Lcom/mongodb/WriteConcern;Z)V
14: aload 0
invokevirtual com.mongodb.client.internal.ClientSessionImpl.getRecoveryToken:()Lorg/bson/BsonDocument;
invokevirtual com.mongodb.operation.CommitTransactionOperation.recoveryToken:(Lorg/bson/BsonDocument;)Lcom/mongodb/operation/CommitTransactionOperation;
15: aload 0
getfield com.mongodb.client.internal.ClientSessionImpl.transactionOptions:Lcom/mongodb/TransactionOptions;
getstatic java.util.concurrent.TimeUnit.MILLISECONDS:Ljava/util/concurrent/TimeUnit;
invokevirtual com.mongodb.TransactionOptions.getMaxCommitTime:(Ljava/util/concurrent/TimeUnit;)Ljava/lang/Long;
getstatic java.util.concurrent.TimeUnit.MILLISECONDS:Ljava/util/concurrent/TimeUnit;
invokevirtual com.mongodb.operation.CommitTransactionOperation.maxCommitTime:(Ljava/lang/Long;Ljava/util/concurrent/TimeUnit;)Lcom/mongodb/operation/CommitTransactionOperation;
16: aload 1
aload 0
17: invokeinterface com.mongodb.client.internal.OperationExecutor.execute:(Lcom/mongodb/operation/WriteOperation;Lcom/mongodb/ReadConcern;Lcom/mongodb/client/ClientSession;)Ljava/lang/Object;
pop
end local 1 18: goto 26
StackMap locals: com.mongodb.client.internal.ClientSessionImpl
StackMap stack: com.mongodb.MongoException
19: astore 1
start local 1 20: aload 0
aload 1
invokevirtual com.mongodb.client.internal.ClientSessionImpl.unpinServerAddressOnError:(Lcom/mongodb/MongoException;)V
21: aload 1
athrow
end local 1 22: StackMap locals:
StackMap stack: java.lang.Throwable
astore 2
23: aload 0
getstatic com.mongodb.client.internal.ClientSessionImpl$TransactionState.COMMITTED:Lcom/mongodb/client/internal/ClientSessionImpl$TransactionState;
putfield com.mongodb.client.internal.ClientSessionImpl.transactionState:Lcom/mongodb/client/internal/ClientSessionImpl$TransactionState;
24: aload 0
iconst_0
putfield com.mongodb.client.internal.ClientSessionImpl.commitInProgress:Z
25: aload 2
athrow
26: StackMap locals:
StackMap stack:
aload 0
getstatic com.mongodb.client.internal.ClientSessionImpl$TransactionState.COMMITTED:Lcom/mongodb/client/internal/ClientSessionImpl$TransactionState;
putfield com.mongodb.client.internal.ClientSessionImpl.transactionState:Lcom/mongodb/client/internal/ClientSessionImpl$TransactionState;
27: aload 0
iconst_0
putfield com.mongodb.client.internal.ClientSessionImpl.commitInProgress:Z
28: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 29 0 this Lcom/mongodb/client/internal/ClientSessionImpl;
6 18 1 readConcern Lcom/mongodb/ReadConcern;
20 22 1 e Lcom/mongodb/MongoException;
Exception table:
from to target type
4 18 19 Class com.mongodb.MongoException
4 22 22 any
public void abortTransaction();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=3, args_size=1
start local 0 0: aload 0
getfield com.mongodb.client.internal.ClientSessionImpl.transactionState:Lcom/mongodb/client/internal/ClientSessionImpl$TransactionState;
getstatic com.mongodb.client.internal.ClientSessionImpl$TransactionState.ABORTED:Lcom/mongodb/client/internal/ClientSessionImpl$TransactionState;
if_acmpne 2
1: new java.lang.IllegalStateException
dup
ldc "Cannot call abortTransaction twice"
invokespecial java.lang.IllegalStateException.<init>:(Ljava/lang/String;)V
athrow
2: StackMap locals:
StackMap stack:
aload 0
getfield com.mongodb.client.internal.ClientSessionImpl.transactionState:Lcom/mongodb/client/internal/ClientSessionImpl$TransactionState;
getstatic com.mongodb.client.internal.ClientSessionImpl$TransactionState.COMMITTED:Lcom/mongodb/client/internal/ClientSessionImpl$TransactionState;
if_acmpne 4
3: new java.lang.IllegalStateException
dup
ldc "Cannot call abortTransaction after calling commitTransaction"
invokespecial java.lang.IllegalStateException.<init>:(Ljava/lang/String;)V
athrow
4: StackMap locals:
StackMap stack:
aload 0
getfield com.mongodb.client.internal.ClientSessionImpl.transactionState:Lcom/mongodb/client/internal/ClientSessionImpl$TransactionState;
getstatic com.mongodb.client.internal.ClientSessionImpl$TransactionState.NONE:Lcom/mongodb/client/internal/ClientSessionImpl$TransactionState;
if_acmpne 6
5: new java.lang.IllegalStateException
dup
ldc "There is no transaction started"
invokespecial java.lang.IllegalStateException.<init>:(Ljava/lang/String;)V
athrow
6: StackMap locals:
StackMap stack:
aload 0
getfield com.mongodb.client.internal.ClientSessionImpl.messageSentInCurrentTransaction:Z
ifeq 22
7: aload 0
getfield com.mongodb.client.internal.ClientSessionImpl.transactionOptions:Lcom/mongodb/TransactionOptions;
invokevirtual com.mongodb.TransactionOptions.getReadConcern:()Lcom/mongodb/ReadConcern;
astore 1
start local 1 8: aload 1
ifnonnull 10
9: new com.mongodb.MongoInternalException
dup
ldc "Invariant violated. Transaction options read concern can not be null"
invokespecial com.mongodb.MongoInternalException.<init>:(Ljava/lang/String;)V
athrow
10: StackMap locals: com.mongodb.ReadConcern
StackMap stack:
aload 0
getfield com.mongodb.client.internal.ClientSessionImpl.delegate:Lcom/mongodb/client/internal/MongoClientDelegate;
invokevirtual com.mongodb.client.internal.MongoClientDelegate.getOperationExecutor:()Lcom/mongodb/client/internal/OperationExecutor;
new com.mongodb.operation.AbortTransactionOperation
dup
aload 0
getfield com.mongodb.client.internal.ClientSessionImpl.transactionOptions:Lcom/mongodb/TransactionOptions;
invokevirtual com.mongodb.TransactionOptions.getWriteConcern:()Lcom/mongodb/WriteConcern;
invokespecial com.mongodb.operation.AbortTransactionOperation.<init>:(Lcom/mongodb/WriteConcern;)V
11: aload 0
invokevirtual com.mongodb.client.internal.ClientSessionImpl.getRecoveryToken:()Lorg/bson/BsonDocument;
invokevirtual com.mongodb.operation.AbortTransactionOperation.recoveryToken:(Lorg/bson/BsonDocument;)Lcom/mongodb/operation/AbortTransactionOperation;
12: aload 1
aload 0
13: invokeinterface com.mongodb.client.internal.OperationExecutor.execute:(Lcom/mongodb/operation/WriteOperation;Lcom/mongodb/ReadConcern;Lcom/mongodb/client/ClientSession;)Ljava/lang/Object;
pop
end local 1 14: goto 22
StackMap locals: com.mongodb.client.internal.ClientSessionImpl
StackMap stack: java.lang.Exception
15: astore 1
start local 1 16: aload 1
instanceof com.mongodb.MongoException
ifeq 18
17: aload 0
aload 1
checkcast com.mongodb.MongoException
invokevirtual com.mongodb.client.internal.ClientSessionImpl.unpinServerAddressOnError:(Lcom/mongodb/MongoException;)V
end local 1 18: StackMap locals:
StackMap stack:
aload 0
getstatic com.mongodb.client.internal.ClientSessionImpl$TransactionState.ABORTED:Lcom/mongodb/client/internal/ClientSessionImpl$TransactionState;
invokevirtual com.mongodb.client.internal.ClientSessionImpl.cleanupTransaction:(Lcom/mongodb/client/internal/ClientSessionImpl$TransactionState;)V
goto 23
19: StackMap locals:
StackMap stack: java.lang.Throwable
astore 2
20: aload 0
getstatic com.mongodb.client.internal.ClientSessionImpl$TransactionState.ABORTED:Lcom/mongodb/client/internal/ClientSessionImpl$TransactionState;
invokevirtual com.mongodb.client.internal.ClientSessionImpl.cleanupTransaction:(Lcom/mongodb/client/internal/ClientSessionImpl$TransactionState;)V
21: aload 2
athrow
22: StackMap locals:
StackMap stack:
aload 0
getstatic com.mongodb.client.internal.ClientSessionImpl$TransactionState.ABORTED:Lcom/mongodb/client/internal/ClientSessionImpl$TransactionState;
invokevirtual com.mongodb.client.internal.ClientSessionImpl.cleanupTransaction:(Lcom/mongodb/client/internal/ClientSessionImpl$TransactionState;)V
23: StackMap locals:
StackMap stack:
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 24 0 this Lcom/mongodb/client/internal/ClientSessionImpl;
8 14 1 readConcern Lcom/mongodb/ReadConcern;
16 18 1 e Ljava/lang/Exception;
Exception table:
from to target type
6 14 15 Class java.lang.Exception
6 18 19 any
private void unpinServerAddressOnError(com.mongodb.MongoException);
descriptor: (Lcom/mongodb/MongoException;)V
flags: (0x0002) ACC_PRIVATE
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 1
ldc "TransientTransactionError"
invokevirtual com.mongodb.MongoException.hasErrorLabel:(Ljava/lang/String;)Z
ifne 1
aload 1
ldc "UnknownTransactionCommitResult"
invokevirtual com.mongodb.MongoException.hasErrorLabel:(Ljava/lang/String;)Z
ifeq 2
1: StackMap locals:
StackMap stack:
aload 0
aconst_null
invokevirtual com.mongodb.client.internal.ClientSessionImpl.setPinnedServerAddress:(Lcom/mongodb/ServerAddress;)V
2: StackMap locals:
StackMap stack:
return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lcom/mongodb/client/internal/ClientSessionImpl;
0 3 1 e Lcom/mongodb/MongoException;
MethodParameters:
Name Flags
e final
public <T> T withTransaction(com.mongodb.client.TransactionBody<T>);
descriptor: (Lcom/mongodb/client/TransactionBody;)Ljava/lang/Object;
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=2, args_size=2
start local 0 start local 1 0: aload 0
aload 1
invokestatic com.mongodb.TransactionOptions.builder:()Lcom/mongodb/TransactionOptions$Builder;
invokevirtual com.mongodb.TransactionOptions$Builder.build:()Lcom/mongodb/TransactionOptions;
invokevirtual com.mongodb.client.internal.ClientSessionImpl.withTransaction:(Lcom/mongodb/client/TransactionBody;Lcom/mongodb/TransactionOptions;)Ljava/lang/Object;
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lcom/mongodb/client/internal/ClientSessionImpl;
0 1 1 transactionBody Lcom/mongodb/client/TransactionBody<TT;>;
Signature: <T:Ljava/lang/Object;>(Lcom/mongodb/client/TransactionBody<TT;>;)TT;
MethodParameters:
Name Flags
transactionBody final
public <T> T withTransaction(com.mongodb.client.TransactionBody<T>, com.mongodb.TransactionOptions);
descriptor: (Lcom/mongodb/client/TransactionBody;Lcom/mongodb/TransactionOptions;)Ljava/lang/Object;
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=7, args_size=3
start local 0 start local 1 start local 2 0: ldc "transactionBody"
aload 1
invokestatic com.mongodb.assertions.Assertions.notNull:(Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/Object;
pop
1: getstatic com.mongodb.client.internal.ClientSessionClock.INSTANCE:Lcom/mongodb/client/internal/ClientSessionClock;
invokevirtual com.mongodb.client.internal.ClientSessionClock.now:()J
lstore 3
start local 3 2: StackMap locals: long
StackMap stack:
aload 0
aload 2
invokevirtual com.mongodb.client.internal.ClientSessionImpl.startTransaction:(Lcom/mongodb/TransactionOptions;)V
3: aload 1
invokeinterface com.mongodb.client.TransactionBody.execute:()Ljava/lang/Object;
astore 5
start local 5 4: goto 13
end local 5 StackMap locals:
StackMap stack: java.lang.RuntimeException
5: astore 6
start local 6 6: aload 0
getfield com.mongodb.client.internal.ClientSessionImpl.transactionState:Lcom/mongodb/client/internal/ClientSessionImpl$TransactionState;
getstatic com.mongodb.client.internal.ClientSessionImpl$TransactionState.IN:Lcom/mongodb/client/internal/ClientSessionImpl$TransactionState;
if_acmpne 8
7: aload 0
invokevirtual com.mongodb.client.internal.ClientSessionImpl.abortTransaction:()V
8: StackMap locals: com.mongodb.client.internal.ClientSessionImpl com.mongodb.client.TransactionBody com.mongodb.TransactionOptions long top java.lang.RuntimeException
StackMap stack:
aload 6
instanceof com.mongodb.MongoException
ifeq 12
9: aload 6
checkcast com.mongodb.MongoException
ldc "TransientTransactionError"
invokevirtual com.mongodb.MongoException.hasErrorLabel:(Ljava/lang/String;)Z
ifeq 12
10: getstatic com.mongodb.client.internal.ClientSessionClock.INSTANCE:Lcom/mongodb/client/internal/ClientSessionClock;
invokevirtual com.mongodb.client.internal.ClientSessionClock.now:()J
lload 3
lsub
ldc 120000
lcmp
ifge 12
11: goto 2
12: StackMap locals:
StackMap stack:
aload 6
athrow
end local 6 start local 5 13: StackMap locals: com.mongodb.client.internal.ClientSessionImpl com.mongodb.client.TransactionBody com.mongodb.TransactionOptions long java.lang.Object
StackMap stack:
aload 0
getfield com.mongodb.client.internal.ClientSessionImpl.transactionState:Lcom/mongodb/client/internal/ClientSessionImpl$TransactionState;
getstatic com.mongodb.client.internal.ClientSessionImpl$TransactionState.IN:Lcom/mongodb/client/internal/ClientSessionImpl$TransactionState;
if_acmpne 26
14: StackMap locals:
StackMap stack:
aload 0
invokevirtual com.mongodb.client.internal.ClientSessionImpl.commitTransaction:()V
15: goto 26
16: StackMap locals:
StackMap stack: com.mongodb.MongoException
astore 6
start local 6 17: aload 0
aload 6
invokevirtual com.mongodb.client.internal.ClientSessionImpl.unpinServerAddressOnError:(Lcom/mongodb/MongoException;)V
18: getstatic com.mongodb.client.internal.ClientSessionClock.INSTANCE:Lcom/mongodb/client/internal/ClientSessionClock;
invokevirtual com.mongodb.client.internal.ClientSessionClock.now:()J
lload 3
lsub
ldc 120000
lcmp
ifge 25
19: aload 0
invokevirtual com.mongodb.client.internal.ClientSessionImpl.applyMajorityWriteConcernToTransactionOptions:()V
20: aload 6
instanceof com.mongodb.MongoExecutionTimeoutException
ifne 23
21: aload 6
ldc "UnknownTransactionCommitResult"
invokevirtual com.mongodb.MongoException.hasErrorLabel:(Ljava/lang/String;)Z
ifeq 23
22: goto 14
23: StackMap locals: com.mongodb.MongoException
StackMap stack:
aload 6
ldc "TransientTransactionError"
invokevirtual com.mongodb.MongoException.hasErrorLabel:(Ljava/lang/String;)Z
ifeq 25
24: goto 2
25: StackMap locals:
StackMap stack:
aload 6
athrow
end local 6 26: StackMap locals:
StackMap stack:
aload 5
areturn
end local 5 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 27 0 this Lcom/mongodb/client/internal/ClientSessionImpl;
0 27 1 transactionBody Lcom/mongodb/client/TransactionBody<TT;>;
0 27 2 options Lcom/mongodb/TransactionOptions;
2 27 3 startTime J
4 5 5 retVal TT;
13 27 5 retVal TT;
6 13 6 e Ljava/lang/RuntimeException;
17 26 6 e Lcom/mongodb/MongoException;
Exception table:
from to target type
2 4 5 Class java.lang.RuntimeException
14 15 16 Class com.mongodb.MongoException
Signature: <T:Ljava/lang/Object;>(Lcom/mongodb/client/TransactionBody<TT;>;Lcom/mongodb/TransactionOptions;)TT;
MethodParameters:
Name Flags
transactionBody final
options final
private void applyMajorityWriteConcernToTransactionOptions();
descriptor: ()V
flags: (0x0002) ACC_PRIVATE
Code:
stack=4, locals=2, args_size=1
start local 0 0: aload 0
getfield com.mongodb.client.internal.ClientSessionImpl.transactionOptions:Lcom/mongodb/TransactionOptions;
ifnull 11
1: aload 0
getfield com.mongodb.client.internal.ClientSessionImpl.transactionOptions:Lcom/mongodb/TransactionOptions;
invokevirtual com.mongodb.TransactionOptions.getWriteConcern:()Lcom/mongodb/WriteConcern;
astore 1
start local 1 2: aload 1
ifnull 7
3: aload 0
invokestatic com.mongodb.TransactionOptions.builder:()Lcom/mongodb/TransactionOptions$Builder;
4: aload 1
ldc "majority"
invokevirtual com.mongodb.WriteConcern.withW:(Ljava/lang/String;)Lcom/mongodb/WriteConcern;
invokevirtual com.mongodb.TransactionOptions$Builder.writeConcern:(Lcom/mongodb/WriteConcern;)Lcom/mongodb/TransactionOptions$Builder;
invokevirtual com.mongodb.TransactionOptions$Builder.build:()Lcom/mongodb/TransactionOptions;
aload 0
getfield com.mongodb.client.internal.ClientSessionImpl.transactionOptions:Lcom/mongodb/TransactionOptions;
5: invokestatic com.mongodb.TransactionOptions.merge:(Lcom/mongodb/TransactionOptions;Lcom/mongodb/TransactionOptions;)Lcom/mongodb/TransactionOptions;
putfield com.mongodb.client.internal.ClientSessionImpl.transactionOptions:Lcom/mongodb/TransactionOptions;
6: goto 12
7: StackMap locals: com.mongodb.WriteConcern
StackMap stack:
aload 0
invokestatic com.mongodb.TransactionOptions.builder:()Lcom/mongodb/TransactionOptions$Builder;
8: getstatic com.mongodb.WriteConcern.MAJORITY:Lcom/mongodb/WriteConcern;
invokevirtual com.mongodb.TransactionOptions$Builder.writeConcern:(Lcom/mongodb/WriteConcern;)Lcom/mongodb/TransactionOptions$Builder;
invokevirtual com.mongodb.TransactionOptions$Builder.build:()Lcom/mongodb/TransactionOptions;
aload 0
getfield com.mongodb.client.internal.ClientSessionImpl.transactionOptions:Lcom/mongodb/TransactionOptions;
9: invokestatic com.mongodb.TransactionOptions.merge:(Lcom/mongodb/TransactionOptions;Lcom/mongodb/TransactionOptions;)Lcom/mongodb/TransactionOptions;
putfield com.mongodb.client.internal.ClientSessionImpl.transactionOptions:Lcom/mongodb/TransactionOptions;
end local 1 10: goto 12
11: StackMap locals:
StackMap stack:
aload 0
invokestatic com.mongodb.TransactionOptions.builder:()Lcom/mongodb/TransactionOptions$Builder;
getstatic com.mongodb.WriteConcern.MAJORITY:Lcom/mongodb/WriteConcern;
invokevirtual com.mongodb.TransactionOptions$Builder.writeConcern:(Lcom/mongodb/WriteConcern;)Lcom/mongodb/TransactionOptions$Builder;
invokevirtual com.mongodb.TransactionOptions$Builder.build:()Lcom/mongodb/TransactionOptions;
putfield com.mongodb.client.internal.ClientSessionImpl.transactionOptions:Lcom/mongodb/TransactionOptions;
12: StackMap locals:
StackMap stack:
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 13 0 this Lcom/mongodb/client/internal/ClientSessionImpl;
2 10 1 writeConcern Lcom/mongodb/WriteConcern;
public void close();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=1
start local 0 0: aload 0
getfield com.mongodb.client.internal.ClientSessionImpl.transactionState:Lcom/mongodb/client/internal/ClientSessionImpl$TransactionState;
getstatic com.mongodb.client.internal.ClientSessionImpl$TransactionState.IN:Lcom/mongodb/client/internal/ClientSessionImpl$TransactionState;
if_acmpne 6
1: aload 0
invokevirtual com.mongodb.client.internal.ClientSessionImpl.abortTransaction:()V
2: goto 6
StackMap locals:
StackMap stack: java.lang.Throwable
3: astore 1
4: aload 0
invokespecial com.mongodb.internal.session.BaseClientSessionImpl.close:()V
5: aload 1
athrow
6: StackMap locals:
StackMap stack:
aload 0
invokespecial com.mongodb.internal.session.BaseClientSessionImpl.close:()V
7: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 8 0 this Lcom/mongodb/client/internal/ClientSessionImpl;
Exception table:
from to target type
0 3 3 any
private void cleanupTransaction(com.mongodb.client.internal.ClientSessionImpl$TransactionState);
descriptor: (Lcom/mongodb/client/internal/ClientSessionImpl$TransactionState;)V
flags: (0x0002) ACC_PRIVATE
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 0
iconst_0
putfield com.mongodb.client.internal.ClientSessionImpl.messageSentInCurrentTransaction:Z
1: aload 0
aconst_null
putfield com.mongodb.client.internal.ClientSessionImpl.transactionOptions:Lcom/mongodb/TransactionOptions;
2: aload 0
aload 1
putfield com.mongodb.client.internal.ClientSessionImpl.transactionState:Lcom/mongodb/client/internal/ClientSessionImpl$TransactionState;
3: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Lcom/mongodb/client/internal/ClientSessionImpl;
0 4 1 nextState Lcom/mongodb/client/internal/ClientSessionImpl$TransactionState;
MethodParameters:
Name Flags
nextState final
}
SourceFile: "ClientSessionImpl.java"
NestMembers:
com.mongodb.client.internal.ClientSessionImpl$TransactionState
InnerClasses:
public final Builder = com.mongodb.TransactionOptions$Builder of com.mongodb.TransactionOptions
private final TransactionState = com.mongodb.client.internal.ClientSessionImpl$TransactionState of com.mongodb.client.internal.ClientSessionImpl