public ProducerChannel(string uri, bool isReliable, bool isInOrder) { Uri = uri; IsReliable = isReliable; IsInOrder = isInOrder; Buffer = new ChannelBuffer(); _isOpen = new ThreadSafe.Boolean(false); }
public RemoteConfigLongPollService() { m_longPollFailSchedulePolicyInSecond = new ExponentialSchedulePolicy(1, 120); //in second m_longPollSuccessSchedulePolicyInMS = new ExponentialSchedulePolicy(100, 1000); //in millisecond m_longPollingStarted = new ThreadSafe.Boolean(false); m_longPollingStopped = new ThreadSafe.Boolean(false); m_longPollNamespaces = new ConcurrentDictionary <string, ISet <RemoteConfigRepository> >(); m_notifications = new ConcurrentDictionary <string, long?>(); }
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); }
private readonly ConcurrentDictionary <string, ApolloNotificationMessages> _remoteNotificationMessages; //namespaceName -> watchedKey -> notificationId public RemoteConfigLongPollService(ConfigServiceLocator serviceLocator, HttpUtil httpUtil, IApolloOptions configUtil) { _serviceLocator = serviceLocator; _httpUtil = httpUtil; _options = configUtil; _longPollFailSchedulePolicyInSecond = new ExponentialSchedulePolicy(1, 120); //in second _longPollSuccessSchedulePolicyInMs = new ExponentialSchedulePolicy(100, 1000); //in millisecond _longPollingStarted = new ThreadSafe.Boolean(false); _longPollingStopped = new ThreadSafe.Boolean(false); _longPollNamespaces = new ConcurrentDictionary <string, ISet <RemoteConfigRepository> >(); _notifications = new ConcurrentDictionary <string, long?>(); _remoteNotificationMessages = new ConcurrentDictionary <string, ApolloNotificationMessages>(); }
protected AbstractConsumer(IConsumerBuffer buffer) { Guard.ArgumentNotNull(buffer, buffer.GetType().FullName); Buffer = buffer; _cts = new CancellationTokenSource(); _threadPool = new ThreadPool(); _isTaskStart = new ThreadSafe.Boolean(false); ConfigUtil.Instance.NotifyPropertyChange += OnNotifyPropertyChange; #if DEBUG this.debugLog = ObjectFactory.Current.Get<IDebugLogWriter>(Lifetime.ContainerControlled); #endif }
public DefaultConfig(IDataRepository configRepository, ILogger <DefaultConfig> logger) { _configRepository = configRepository; _logger = logger; _loaded = new ThreadSafe.Boolean(false); }
public DefaultErrorCode(IDataRepository dataRepository) { _dataRepository = dataRepository; _loaded = new ThreadSafe.Boolean(false); }