コード例 #1
0
 public DefaultConfig(string namespaceName, IConfigRepository configRepository)
 {
     Namespace          = m_namespace = namespaceName;
     m_configRepository = configRepository;
     m_configProperties = new ThreadSafe.AtomicReference <Properties>(null);
     Initialize();
 }
コード例 #2
0
        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);
        }
コード例 #3
0
 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>());
 }
コード例 #4
0
 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);
     
 }
コード例 #5
0
 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();
 }
コード例 #6
0
 public ConfigServiceLocator()
 {
     m_configServices = new ThreadSafe.AtomicReference <IList <ServiceDTO> >(new List <ServiceDTO>());
 }