Exemplo n.º 1
0
        protected NodeBase(ICluster owner, IPEndPoint endpoint, ISocket socket, IFailurePolicyFactory failurePolicyFactory)
        {
            this.owner    = owner ?? throw new ArgumentNullException(nameof(owner));
            this.endpoint = endpoint ?? throw new ArgumentNullException(nameof(endpoint));
            this.socket   = socket;

            name       = endpoint.ToString();
            failLock   = new object();
            writeQueue = new ConcurrentQueue <OpQueueEntry>();
            readQueue  = new Queue <OpQueueEntry>();

            IsAlive       = true;
            mustReconnect = true;

            flushWriteBufferAction  = FlushWriteBufferRequest;
            tryAskForMoreDataAction = TryAskForMoreDataRequest;
            failurePolicy           = (failurePolicyFactory ?? throw new ArgumentNullException(nameof(failurePolicyFactory))).Create(this);

            npm = new NodePerformanceMonitor(name);
        }
Exemplo n.º 2
0
 public MemcachedNode(MemoryPool <byte> allocator, ICluster owner, IPEndPoint endpoint, ISocket socket, IFailurePolicyFactory failurePolicyFactory)
     : base(owner, endpoint, socket, failurePolicyFactory)
 {
     this.allocator = allocator;
 }
Exemplo n.º 3
0
 public FailNode(ICluster owner, IPEndPoint endpoint, ISocket socket, IFailurePolicyFactory failurePolicyFactory) : base(owner, endpoint, socket, failurePolicyFactory)
 {
 }