コード例 #1
0
        /// <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;
        }
コード例 #2
0
        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;
        }
コード例 #3
0
        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;
        }
コード例 #4
0
        /// <summary>
        /// Constructs a new <see cref="SessionPoolOptions"/>.
        /// </summary>
        public SessionPoolOptions()
        {
            var retry = SpannerSettings.GetDefault().CommitSettings.Timing.Retry;

            Timeout = (int)(retry?.TotalExpiration.Timeout).Value.TotalSeconds;
        }