Class RemoteTransaction
A controller for a remote transaction that is constructed from
g.Tx()
. Calling Begin()
on
this object will produce a new GraphTraversalSource
that is bound to a remote transaction over which
multiple traversals may be executed in that context. Calling CommitAsync()
or
RollbackAsync()
will then close the transaction and thus, the session. This feature only works with
transaction enabled graphs.
Inheritance
System.Object
RemoteTransaction
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ToString()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: Gremlin.Net.Process.Remote
Assembly: cs.temp.dll.dll
Syntax
public class RemoteTransaction
Constructors
RemoteTransaction(IRemoteConnection, GraphTraversalSource)
Initializes a new instance of the RemoteTransaction class.
Declaration
public RemoteTransaction(IRemoteConnection connection, GraphTraversalSource g)
Parameters
Type | Name | Description |
---|---|---|
IRemoteConnection | connection | The session bound connection that will be used to control this transaction. |
GraphTraversalSource | g | The graph traversal source from which a session bound traversal source will be created. |
Methods
Begin()
Spawns a
Declaration
public GraphTraversalSource Begin()
Returns
Type | Description |
---|---|
GraphTraversalSource | A |
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | Thrown if this transaction is already bound to a session. |
CommitAsync(CancellationToken)
Commits the transaction.
Declaration
public async Task CommitAsync(CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
CancellationToken | cancellationToken | The token to cancel the operation. The default value is None. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
RollbackAsync()
Rolls back the transaction.
Declaration
public async Task RollbackAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |