internal static SpannerTransaction FromTransactionId(SpannerConnection connection, TransactionId transactionId) { return(new SpannerTransaction( connection, TransactionMode.ReadOnly, new Session { Name = transactionId.Session }, new V1.Transaction { Id = ByteString.FromBase64(transactionId.Id) }, transactionId.TimestampBound) { Shared = true, DisposeBehavior = DisposeBehavior.Detach //this transaction is coming from another process potentially, so we don't auto close it. }); }
internal VolatileResourceManager(SpannerConnection spannerConnection, TimestampBound timestampBound, TransactionId transactionId) { _spannerConnection = spannerConnection; _timestampBound = timestampBound; _transactionId = transactionId; }
internal VolatileResourceManager(SpannerConnection spannerConnection, TimestampBound timestampBound, TransactionId transactionId) { _spannerConnection = spannerConnection; _timestampBound = timestampBound; _transaction = new Lazy <Task <SpannerTransaction> >(CreateTransactionAsync, LazyThreadSafetyMode.ExecutionAndPublication); _transactionId = transactionId; }