Esempio n. 1
0
 public GenericEventHandler(
     string name,
     bool enabled,
     UnlaunchRestWrapper restClientForEventsApi,
     TimeSpan eventFlushInterval,
     int maxBufferSize) : base(name, enabled, restClientForEventsApi, eventFlushInterval, maxBufferSize)
 {
 }
 public RefreshableDataStoreProvider(
     UnlaunchRestWrapper restWrapper,
     UnlaunchGenericRestWrapper s3BucketClient,
     CountdownEvent initialDownloadDoneEvent,
     AtomicBoolean downloadSuccessful,
     TimeSpan dataStoreRefreshDelay)
 {
     _restWrapper              = restWrapper;
     _s3BucketClient           = s3BucketClient;
     _dataStoreRefreshDelay    = dataStoreRefreshDelay;
     _initialDownloadDoneEvent = initialDownloadDoneEvent;
     _downloadSuccessful       = downloadSuccessful;
 }
Esempio n. 3
0
        public AbstractEventHandler(
            string name,
            bool enabled,
            UnlaunchRestWrapper restClientForEventsApi,
            TimeSpan eventFlushInterval,
            int maxBufferSize)
        {
            _name          = name;
            _enabled       = enabled;
            _restClient    = restClientForEventsApi;
            _maxBufferSize = maxBufferSize;

            _timer = new Timer((e) => { CreateFlushEventsTask(); }, null, TimeSpan.Zero, eventFlushInterval);
        }
        public UnlaunchHttpDataStore(
            UnlaunchRestWrapper restWrapper,
            UnlaunchGenericRestWrapper s3BucketClient,
            CountdownEvent intInitialDownloadDoneEvent,
            AtomicBoolean downloadSuccessful,
            TimeSpan dataStoreRefreshDelay)
        {
            _restWrapper              = restWrapper;
            _s3BucketClient           = s3BucketClient;
            _initialDownloadDoneEvent = intInitialDownloadDoneEvent;
            _downloadSuccessful       = downloadSuccessful;
            _flagMapReference         = new AtomicReference <IDictionary <string, FeatureFlag> >(new Dictionary <string, FeatureFlag>());

            _timer = new Timer((e) => { CreateTask(); }, null, TimeSpan.Zero, dataStoreRefreshDelay);
        }