예제 #1
0
 public SelfUpdatingEventLog(IEventSdkApiClient apiClient, int firstPushWindow, int interval, ISimpleCache <WrappedEvent> eventsCache, int maximumNumberOfKeysToCache = -1)
 {
     this.wrappedEventsCache = (eventsCache as ISimpleProducerCache <WrappedEvent>) ?? new InMemorySimpleCache <WrappedEvent>(new BlockingQueue <WrappedEvent>(maximumNumberOfKeysToCache));
     this.apiClient          = apiClient;
     this.interval           = interval;
     this.firstPushWindow    = firstPushWindow;
 }
예제 #2
0
        private void BuildSdkApiClients()
        {
            var headers = GetHeaders();

            headers.Add(Constants.Http.AcceptEncoding, Constants.Http.Gzip);
            headers.Add(Constants.Http.KeepAlive, "true");

            _splitSdkApiClient       = new SplitSdkApiClient(ApiKey, headers, _config.BaseUrl, _config.HttpConnectionTimeout, _config.HttpReadTimeout, _telemetryRuntimeProducer);
            _segmentSdkApiClient     = new SegmentSdkApiClient(ApiKey, headers, _config.BaseUrl, _config.HttpConnectionTimeout, _config.HttpReadTimeout, _telemetryRuntimeProducer);
            _impressionsSdkApiClient = new ImpressionsSdkApiClient(ApiKey, headers, _config.EventsBaseUrl, _config.HttpConnectionTimeout, _config.HttpReadTimeout, _telemetryRuntimeProducer, _wrapperAdapter, _config.ImpressionsBulkSize);
            _eventSdkApiClient       = new EventSdkApiClient(ApiKey, headers, _config.EventsBaseUrl, _config.HttpConnectionTimeout, _config.HttpReadTimeout, _telemetryRuntimeProducer, _tasksManager, _wrapperAdapter, _config.EventsBulkSize);
        }
예제 #3
0
        public EventsLog(IEventSdkApiClient apiClient,
                         int firstPushWindow,
                         int interval,
                         ISimpleCache <WrappedEvent> eventsCache,
                         int maximumNumberOfKeysToCache = -1)
        {
            _cancellationTokenSource = new CancellationTokenSource();

            _wrappedEventsCache = (eventsCache as ISimpleProducerCache <WrappedEvent>) ?? new InMemorySimpleCache <WrappedEvent>(new BlockingQueue <WrappedEvent>(maximumNumberOfKeysToCache));
            _apiClient          = apiClient;
            _interval           = interval;
            _firstPushWindow    = firstPushWindow;

            _wrapperAdapter = new WrapperAdapter();
        }
예제 #4
0
        private void BuildSdkApiClients()
        {
            var header = new HTTPHeader();

            header.authorizationApiKey = ApiKey;
            header.splitSDKVersion     = SdkVersion;
            header.splitSDKSpecVersion = SdkSpecVersion;
            header.splitSDKMachineName = SdkMachineName;
            header.splitSDKMachineIP   = SdkMachineIP;
            metricsSdkApiClient        = new MetricsSdkApiClient(header, EventsBaseUrl, HttpConnectionTimeout, HttpReadTimeout);
            BuildMetricsLog();
            splitSdkApiClient     = new SplitSdkApiClient(header, BaseUrl, HttpConnectionTimeout, HttpReadTimeout, metricsLog);
            segmentSdkApiClient   = new SegmentSdkApiClient(header, BaseUrl, HttpConnectionTimeout, HttpReadTimeout, metricsLog);
            treatmentSdkApiClient = new TreatmentSdkApiClient(header, EventsBaseUrl, HttpConnectionTimeout, HttpReadTimeout);
            eventSdkApiClient     = new EventSdkApiClient(header, EventsBaseUrl, HttpConnectionTimeout, HttpReadTimeout);
        }
예제 #5
0
        private void BuildSdkApiClients()
        {
            var header = new HTTPHeader
            {
                authorizationApiKey = ApiKey,
                splitSDKVersion     = _config.SdkVersion,
                splitSDKSpecVersion = _config.SdkSpecVersion,
                splitSDKMachineName = _config.SdkMachineName,
                splitSDKMachineIP   = _config.SdkMachineIP
            };

            _metricsSdkApiClient = new MetricsSdkApiClient(header, _config.EventsBaseUrl, _config.HttpConnectionTimeout, _config.HttpReadTimeout);
            BuildMetricsLog();
            _splitSdkApiClient     = new SplitSdkApiClient(header, _config.BaseUrl, _config.HttpConnectionTimeout, _config.HttpReadTimeout, _metricsLog);
            _segmentSdkApiClient   = new SegmentSdkApiClient(header, _config.BaseUrl, _config.HttpConnectionTimeout, _config.HttpReadTimeout, _metricsLog);
            _treatmentSdkApiClient = new TreatmentSdkApiClient(header, _config.EventsBaseUrl, _config.HttpConnectionTimeout, _config.HttpReadTimeout);
            _eventSdkApiClient     = new EventSdkApiClient(header, _config.EventsBaseUrl, _config.HttpConnectionTimeout, _config.HttpReadTimeout);
        }