/// <inheritdoc />
        public IObservable <ISnapshotStatusResponse> SnapshotObservable(TimeSpan interval, ISnapshotRequest snapshotRequest)
        {
            snapshotRequest.ThrowIfNull("snapshotRequest");
            var observable = new SnapshotObservable(this, snapshotRequest);

            return(observable);
        }
        public SnapshotStatusHumbleObject(IElasticClient elasticClient, ISnapshotRequest snapshotRequest)
        {
            elasticClient.ThrowIfNull("elasticClient");
            snapshotRequest.ThrowIfNull("snapshotRequest");

            _elasticClient   = elasticClient;
            _snapshotRequest = snapshotRequest;
        }
Exemple #3
0
        public SnapshotObservable(IElasticClient elasticClient, ISnapshotRequest snapshotRequest)
        {
            elasticClient.ThrowIfNull(nameof(elasticClient));
            snapshotRequest.ThrowIfNull(nameof(snapshotRequest));

            _elasticClient                         = elasticClient;
            _snapshotRequest                       = snapshotRequest;
            _snapshotStatusHumbleObject            = new SnapshotStatusHumbleObject(elasticClient, snapshotRequest);
            _snapshotStatusHumbleObject.Completed += StopTimer;
            _snapshotStatusHumbleObject.Error     += StopTimer;
        }
        public SnapshotObservable(IOpenSearchClient opensearchClient, ISnapshotRequest snapshotRequest)
        {
            opensearchClient.ThrowIfNull(nameof(opensearchClient));
            snapshotRequest.ThrowIfNull(nameof(snapshotRequest));

            _opensearchClient = opensearchClient;
            _snapshotRequest  = snapshotRequest;
            _snapshotRequest.RequestParameters.SetRequestMetaData(RequestMetaDataFactory.SnapshotHelperRequestMetaData());
            _snapshotStatusHumbleObject            = new SnapshotStatusHumbleObject(opensearchClient, snapshotRequest);
            _snapshotStatusHumbleObject.Completed += StopTimer;
            _snapshotStatusHumbleObject.Error     += StopTimer;
        }
		/// <inheritdoc />
		public IObservable<ISnapshotStatusResponse> SnapshotObservable(TimeSpan interval, ISnapshotRequest snapshotRequest)
		{
			snapshotRequest.ThrowIfNull("snapshotRequest");
			var observable = new SnapshotObservable(this, snapshotRequest);
			return observable;
		}