/// <summary> /// Constructs a new <see cref="SessionPoolOptions"/>. /// </summary> public SessionPoolOptions() { var retry = SpannerSettings.GetDefault().CommitSettings.Timing.Retry; // ReSharper disable once PossibleInvalidOperationException Timeout = (int)(retry?.TotalExpiration.Timeout).Value.TotalSeconds; }
internal ReliableStreamReader(SpannerClient spannerClient, ExecuteSqlRequest request, Session session) { _spannerClient = spannerClient; _request = request; _session = session; _clock = SpannerSettings.GetDefault().Clock ?? SystemClock.Instance; _scheduler = SpannerSettings.GetDefault().Scheduler ?? SystemScheduler.Instance; _request.SessionAsSessionName = _session.SessionName; }
internal ReliableStreamReader( SpannerClient spannerClient, ExecuteSqlRequest request, Session session, int timeoutSeconds) { _spannerClient = GaxPreconditions.CheckNotNull(spannerClient, nameof(SpannerClient)); _request = GaxPreconditions.CheckNotNull(request, nameof(request)); _session = GaxPreconditions.CheckNotNull(session, nameof(session)); _timeoutSeconds = timeoutSeconds; _clock = SpannerSettings.GetDefault().Clock ?? SystemClock.Instance; _scheduler = SpannerSettings.GetDefault().Scheduler ?? SystemScheduler.Instance; _request.SessionAsSessionName = _session.SessionName; }
/// <summary> /// Constructs a new <see cref="SessionPoolOptions"/>. /// </summary> public SessionPoolOptions() { var retry = SpannerSettings.GetDefault().CommitSettings.Timing.Retry; Timeout = (int)(retry?.TotalExpiration.Timeout).Value.TotalSeconds; }