public DefaultConfig(string namespaceName, IConfigRepository configRepository) { Namespace = m_namespace = namespaceName; m_configRepository = configRepository; m_configProperties = new ThreadSafe.AtomicReference <Properties>(null); Initialize(); }
public ConfigServiceLocator(HttpUtil httpUtil, IApolloOptions configUtil) { _httpUtil = httpUtil; _options = configUtil; _configServices = new ThreadSafe.AtomicReference <IList <ServiceDto> >(new List <ServiceDto>()); _timer = new Timer(SchedulePeriodicRefresh, null, 0, _options.RefreshInterval); }
public HttpDataRepository(ILocalDataRepository localDataRepository, IHttpUrlRepository httpUrlRepository, IHttpClientFactory httpClientFactory, ILogger <HttpDataRepository> logger) { _localDataRepository = localDataRepository; _httpUrlRepository = httpUrlRepository; _httpClientFactory = httpClientFactory; _logger = logger; _dataList = new ThreadSafe.AtomicReference <IList <ApiErrorCodeInfo> >(new List <ApiErrorCodeInfo>()); }
public EndpointSession(DefaultEndpointClient client) { this.client = client; this.flushing = new ThreadSafe.Boolean(false); this.closed = new ThreadSafe.Boolean(false); this.flushingOp = new ThreadSafe.AtomicReference<WriteOp>(null); this.sessionFuture = new ThreadSafe.AtomicReference<IConnectFuture>(null); this.opQueue = new BlockingQueue<WriteOp>(client.Config.EndpointSessionSendBufferSize); }
public RemoteConfigRepository(string namespaceName) { m_namespace = namespaceName; m_configCache = new ThreadSafe.AtomicReference <ApolloConfig>(null); m_configUtil = ComponentLocator.Lookup <ConfigUtil>(); m_httpUtil = ComponentLocator.Lookup <HttpUtil>(); m_serviceLocator = ComponentLocator.Lookup <ConfigServiceLocator>(); m_remoteConfigLongPollService = ComponentLocator.Lookup <RemoteConfigLongPollService>(); m_longPollServiceDto = new ThreadSafe.AtomicReference <ServiceDTO>(null); this.TrySync(); this.SchedulePeriodicRefresh(); this.ScheduleLongPollingRefresh(); }
public ConfigServiceLocator() { m_configServices = new ThreadSafe.AtomicReference <IList <ServiceDTO> >(new List <ServiceDTO>()); }