/// <summary>
 /// Creates a <see cref="CramMd5Mechanism"/> object using a given username (which is a Couchbase Bucket) and password.
 /// </summary>
 /// <param name="ioService">The <see cref="IOService"/>to use for I/O.</param>
 /// <param name="username">The name of the Bucket you are connecting to.</param>
 /// <param name="password">The password for the Bucket.</param>
 /// <param name="transcoder"></param>
 public CramMd5Mechanism(IIOService ioService, string username, string password, ITypeTranscoder transcoder)
 {
     _ioService = ioService;
     Username = username;
     Password = password;
     _transcoder = transcoder;
 }
 /// <summary>
 /// Creates a <see cref="CramMd5Mechanism"/> object using a given username (which is a Couchbase Bucket) and password.
 /// </summary>
 /// <param name="ioStrategy">The <see cref="IOStrategy"/>to use for I/O.</param>
 /// <param name="username">The name of the Bucket you are connecting to.</param>
 /// <param name="password">The password for the Bucket.</param>
 /// <param name="transcoder"></param>
 public CramMd5Mechanism(IOStrategy ioStrategy, string username, string password, ITypeTranscoder transcoder)
 {
     _ioStrategy = ioStrategy;
     Username = username;
     Password = password;
     _transcoder = transcoder;
 }
Exemplo n.º 3
0
 /// <summary>
 /// Ctor for <see cref="KeyObserver"/>.
 /// </summary>
 /// <param name="configInfo">The <see cref="IConfigInfo"/> object which represents the current cluster and client configuration.</param>
 /// <param name="transcoder"></param>
 /// <param name="interval">The interval to poll.</param>
 /// <param name="timeout">The max time to wait for the durability requirements to be met.</param>
 public KeyObserver(IConfigInfo configInfo, ITypeTranscoder transcoder, int interval, int timeout)
 {
     _configInfo = configInfo;
     _interval = interval;
     _timeout = timeout;
     _transcoder = transcoder;
 }
 public PlainTextMechanism(IIOService service, string username, string password, ITypeTranscoder transcoder)
 {
     _service = service;
     Username = username;
     Password = password;
     _transcoder = transcoder;
 }
 public PlainTextMechanism(IOStrategy strategy, string username, string password, ITypeTranscoder transcoder)
 {
     _strategy = strategy;
     Username = username;
     Password = password;
     _transcoder = transcoder;
 }
 public PlainTextMechanism(string username, string password, ITypeTranscoder transcoder, ILoggerFactory loggerFactory)
 {
     Username = username;
     Password = password;
     _transcoder = transcoder;
     Log = loggerFactory.CreateLogger<CramMd5Mechanism>();
 }
 public CouchbaseConfigContext(IBucketConfig bucketConfig, ClientConfiguration clientConfig,
     Func<IConnectionPool, IOStrategy> ioStrategyFactory,
     Func<PoolConfiguration, IPEndPoint, IConnectionPool> connectionPoolFactory,
     Func<string, string, IOStrategy, ITypeTranscoder, ISaslMechanism> saslFactory,
     ITypeTranscoder transcoder)
     : base(bucketConfig, clientConfig, ioStrategyFactory, connectionPoolFactory, saslFactory, transcoder)
 {
 }
 /// <summary>
 /// Creates a <see cref="CramMd5Mechanism"/> object using a given username (which is a Couchbase Bucket) and password.
 /// </summary>
 /// <param name="ioService">The <see cref="IOService"/>to use for I/O.</param>
 /// <param name="username">The name of the Bucket you are connecting to.</param>
 /// <param name="password">The password for the Bucket.</param>
 /// <param name="transcoder"></param>
 public CramMd5Mechanism(IIOService ioService, string username, string password, ITypeTranscoder transcoder, ILoggerFactory loggerFactory)
 {
     Log = loggerFactory.CreateLogger<CramMd5Mechanism>();
     _ioService = ioService;
     Username = username;
     Password = password;
     _transcoder = transcoder;
 }
 public virtual void TestFixtureSetUp()
 {
     EndPoint = UriExtensions.GetEndPoint(Address);
     var connectionPoolConfig = new PoolConfiguration();
     _connectionPool = new ConnectionPool<Connection>(connectionPoolConfig, EndPoint);
     _ioService = new PooledIOService(_connectionPool);
     Transcoder = new DefaultTranscoder();
 }
 public MemcachedConfigContext(IBucketConfig bucketConfig, ClientConfiguration clientConfig,
     Func<IConnectionPool, IIOService> ioServiceFactory,
     Func<PoolConfiguration, IPEndPoint, IConnectionPool> connectionPoolFactory,
     Func<string, string, IIOService, ITypeTranscoder, ISaslMechanism> saslFactory,
     ITypeTranscoder transcoder)
     : base(bucketConfig, clientConfig, ioServiceFactory, connectionPoolFactory, saslFactory, transcoder)
 {
 }
 public HttpStreamingProvider(ClientConfiguration clientConfig,
     Func<IConnectionPool, ILoggerFactory, IIOService> ioServiceFactory,
     Func<PoolConfiguration, IPEndPoint, IConnectionPool> connectionPoolFactory,
     Func<string, string, IIOService, ITypeTranscoder, ISaslMechanism> saslFactory,
     IByteConverter converter,
     ITypeTranscoder transcoder, ILoggerFactory loggerFactory)
     : base(clientConfig, ioServiceFactory, connectionPoolFactory, saslFactory, converter, transcoder, loggerFactory)
 {
 }
 public HttpStreamingProvider(ClientConfiguration clientConfig,
     Func<IConnectionPool, IOStrategy> ioStrategyFactory,
     Func<PoolConfiguration, IPEndPoint, IConnectionPool> connectionPoolFactory,
     Func<string, string, IOStrategy, ITypeTranscoder, ISaslMechanism> saslFactory,
     IByteConverter converter,
     ITypeTranscoder transcoder)
     : base(clientConfig, ioStrategyFactory, connectionPoolFactory, saslFactory, converter, transcoder)
 {
 }
 public MemcachedConfigContext(IBucketConfig bucketConfig, ClientConfiguration clientConfig,
     Func<IConnectionPool,ILoggerFactory, IIOService> ioServiceFactory,
     Func<PoolConfiguration, IPEndPoint, IConnectionPool> connectionPoolFactory,
     Func<string, string, IIOService, ITypeTranscoder, ISaslMechanism> saslFactory,
     ITypeTranscoder transcoder, ILoggerFactory loggerFactory)
     : base(bucketConfig, clientConfig, ioServiceFactory, connectionPoolFactory, saslFactory, transcoder, loggerFactory)
 {
     _loggerFactory = loggerFactory;
     Log = _loggerFactory.CreateLogger<MemcachedConfigContext>();
 }
 public CouchbaseConfigContext(IBucketConfig bucketConfig, ClientConfiguration clientConfig,
     Func<IConnectionPool, IIOService> ioServiceFactory,
     Func<PoolConfiguration, IPEndPoint, IConnectionPool> connectionPoolFactory,
     Func<string, string, IIOService, ITypeTranscoder, ISaslMechanism> saslFactory,
     ITypeTranscoder transcoder)
     : base(bucketConfig, clientConfig, ioServiceFactory, connectionPoolFactory, saslFactory, transcoder)
 {
     //for caching query plans
     QueryCache = new ConcurrentDictionary<string, QueryPlan>();
 }
Exemplo n.º 15
0
 protected OperationBase(string key, IVBucket vBucket, ITypeTranscoder transcoder, uint opaque, uint timeout)
 {
     Key = key;
     Transcoder = transcoder;
     Opaque = opaque;
     CreationTime = DateTime.UtcNow;
     Timeout = timeout;
     VBucket = vBucket;
     Converter = transcoder.Converter;
     MaxRetries = DefaultRetries;
     Data = new MemoryStream();
     Header = new OperationHeader {Status = ResponseStatus.None};
 }
 public CarrierPublicationProvider(ClientConfiguration clientConfig,
     Func<IConnectionPool, IOStrategy> ioStrategyFactory,
     Func<PoolConfiguration, IPEndPoint, IConnectionPool> connectionPoolFactory,
     Func<string, string, IOStrategy, ITypeTranscoder, ISaslMechanism> saslFactory,
     IByteConverter converter,
     ITypeTranscoder transcoder)
     : base(clientConfig, ioStrategyFactory, connectionPoolFactory, saslFactory, converter, transcoder)
 {
     if (ClientConfig.EnableConfigHeartBeat)
         _heartBeat = new Timer(_heartBeat_Elapsed, null, ClientConfig.HeartbeatConfigInterval, Timeout.Infinite);
     else
         _heartBeat = new Timer(_heartBeat_Elapsed, null, Timeout.Infinite, Timeout.Infinite);
 }
 protected ConfigContextBase(IBucketConfig bucketConfig, ClientConfiguration clientConfig,
     Func<IConnectionPool, IOStrategy> ioStrategyFactory,
     Func<PoolConfiguration, IPEndPoint, IConnectionPool> connectionPoolFactory,
     Func<string, string, IOStrategy, ITypeTranscoder, ISaslMechanism> saslFactory,
     ITypeTranscoder transcoder)
 {
     _bucketConfig = bucketConfig;
     _clientConfig = clientConfig;
     IOStrategyFactory = ioStrategyFactory;
     ConnectionPoolFactory = connectionPoolFactory;
     _creationTime = DateTime.Now;
     SaslFactory = saslFactory;
     Transcoder = transcoder;
 }
 protected ConfigProviderBase(ClientConfiguration clientConfig,
     Func<IConnectionPool, IIOService> ioServiceFactory,
     Func<PoolConfiguration, IPEndPoint, IConnectionPool> connectionPoolFactory,
     Func<string, string, IIOService, ITypeTranscoder, ISaslMechanism> saslFactory,
     IByteConverter converter,
     ITypeTranscoder transcoder)
 {
     _clientConfig = clientConfig;
     _ioServiceFactory = ioServiceFactory;
     _connectionPoolFactory = connectionPoolFactory;
     _saslFactory = saslFactory;
     Converter = converter;
     Transcoder = transcoder;
 }
 public ClusterController(ClientConfiguration clientConfig,
     Func<IConnectionPool, IIOService> ioServiceFactory,
     Func<PoolConfiguration, IPEndPoint, IConnectionPool> connectionPoolFactory,
     Func<string, string, IIOService, ITypeTranscoder, ISaslMechanism> saslFactory,
     IByteConverter converter,
     ITypeTranscoder transcoder)
 {
     _clientConfig = clientConfig;
     _ioServiceFactory = ioServiceFactory;
     _connectionPoolFactory = connectionPoolFactory;
     _saslFactory = saslFactory;
     Converter = converter;
     Transcoder = transcoder;
     Initialize();
 }
 protected ConfigContextBase(IBucketConfig bucketConfig, ClientConfiguration clientConfig,
     Func<IConnectionPool, ILoggerFactory, IIOService> ioServiceFactory,
     Func<PoolConfiguration, IPEndPoint, IConnectionPool> connectionPoolFactory,
     Func<string, string, IIOService, ITypeTranscoder, ISaslMechanism> saslFactory,
     ITypeTranscoder transcoder, ILoggerFactory loggerFactory)
 {
     _loggerFactory = loggerFactory;
     Log = _loggerFactory.CreateLogger<ConfigContextBase>();
     _bucketConfig = bucketConfig;
     _clientConfig = clientConfig;
     IOServiceFactory = ioServiceFactory;
     ConnectionPoolFactory = connectionPoolFactory;
     _creationTime = DateTime.Now;
     SaslFactory = saslFactory;
     Transcoder = transcoder;
 }
 public CarrierPublicationProvider(ClientConfiguration clientConfig,
     Func<IConnectionPool, IOStrategy> ioStrategyFactory,
     Func<PoolConfiguration, IPEndPoint, IConnectionPool> connectionPoolFactory,
     Func<string, string, IOStrategy, ITypeTranscoder, ISaslMechanism> saslFactory,
     IByteConverter converter,
     ITypeTranscoder transcoder)
     : base(clientConfig, ioStrategyFactory, connectionPoolFactory, saslFactory, converter, transcoder)
 {
     _heartBeat = new Timer
     {
         Interval = ClientConfig.HeartbeatConfigInterval,
         Enabled = ClientConfig.EnableConfigHeartBeat,
         AutoReset = false
     };
     _heartBeat.Elapsed += _heartBeat_Elapsed;
 }
        public CarrierPublicationProvider(ClientConfiguration clientConfig,
            Func<IConnectionPool, ILoggerFactory, IIOService> ioServiceFactory,
            Func<PoolConfiguration, IPEndPoint, IConnectionPool> connectionPoolFactory,
            Func<string, string, IIOService, ITypeTranscoder, ISaslMechanism> saslFactory,
            IByteConverter converter,
            ITypeTranscoder transcoder,
            ILoggerFactory loggerFactory)
            : base(clientConfig, ioServiceFactory, connectionPoolFactory, saslFactory, converter, transcoder, loggerFactory)
        {
            AutoResetEvent autoEvent = new AutoResetEvent(false);
            _heartBeat = new Timer(_heartBeat_Elapsed, autoEvent, Timeout.Infinite, Timeout.Infinite);

            if (ClientConfig.EnableConfigHeartBeat)
            {
                _heartBeat.Change((int) ClientConfig.HeartbeatConfigInterval, Timeout.Infinite);
            }
        }
        protected OperationBase(string key, IVBucket vBucket, ITypeTranscoder transcoder, uint opaque, uint timeout)
        {
            if (RequiresKey && string.IsNullOrWhiteSpace(key))
            {
                throw new MissingKeyException();
            }

            Key = key;
            Transcoder = transcoder;
            Opaque = opaque;
            CreationTime = DateTime.UtcNow;
            Timeout = timeout;
            VBucket = vBucket;
            Converter = transcoder.Converter;
            MaxRetries = DefaultRetries;
            Data = new MemoryStream();
            Header = new OperationHeader {Status = ResponseStatus.None};
        }
Exemplo n.º 24
0
 public SaslList(ITypeTranscoder transcoder, uint timeout)
     : this(string.Empty, null, transcoder, null, SequenceGenerator.GetNext(), timeout)
 {
 }
Exemplo n.º 25
0
 protected OperationBase(string key, IVBucket vBucket, ITypeTranscoder transcoder, uint timeout)
     : this(key, vBucket, transcoder, SequenceGenerator.GetNext(), timeout)
 {
 }
Exemplo n.º 26
0
 public SubDocDelete(MutateInBuilder <T> builder, string key, IVBucket vBucket, ITypeTranscoder transcoder, uint timeout)
     : base(builder, key, vBucket, transcoder, SequenceGenerator.GetNext(), timeout)
 {
     CurrentSpec = builder.FirstSpec();
     Path        = CurrentSpec.Path;
 }
Exemplo n.º 27
0
 public Touch(string key, IVBucket vBucket, ITypeTranscoder transcoder, uint timeout)
     : base(key, vBucket, transcoder, timeout)
 {
 }
 protected SubDocSingularLookupBase(ISubDocBuilder <T> builder, string key, IVBucket vBucket, ITypeTranscoder transcoder, uint timeout)
     : base(builder, key, vBucket, transcoder, timeout)
 {
 }
Exemplo n.º 29
0
 public Delete(string key, IVBucket vBucket, ITypeTranscoder transcoder, uint timeout)
     : base(key, vBucket, transcoder, timeout)
 {
 }
Exemplo n.º 30
0
 public ObserveSeqno(MutationToken mutationToken, ITypeTranscoder transcoder, uint timeout)
     : base(null, null, transcoder, timeout)
 {
     MutationToken = mutationToken;
 }
Exemplo n.º 31
0
 public MultiLookup(string key, LookupInBuilder <T> builder, IVBucket vBucket, ITypeTranscoder transcoder, uint timeout)
     : base(key, vBucket, transcoder, timeout)
 {
     _builder = builder;
 }
Exemplo n.º 32
0
 private Set(string key, T value, ITypeTranscoder transcoder, IVBucket vBucket, uint opaque, uint timeout)
     : base(key, value, vBucket, transcoder, opaque, timeout)
 {
 }
Exemplo n.º 33
0
 private Increment(string key, ulong initial, ulong delta, uint expiration, IVBucket vBucket, ITypeTranscoder transcoder, uint opaque, uint timeout)
     : base(key, initial, vBucket, transcoder, opaque, timeout)
 {
     _delta      = delta;
     _initial    = initial;
     _expiration = expiration;
 }
Exemplo n.º 34
0
 public Set(string key, T value, IVBucket vBucket, ITypeTranscoder transcoder, uint timeout)
     : base(key, value, vBucket, transcoder, SequenceGenerator.GetNext(), timeout)
 {
 }
 protected SubDocSingularMutationBase(ISubDocBuilder <T> builder, string key, IVBucket vBucket, ITypeTranscoder transcoder, uint opaque, uint timeout)
     : base(builder, key, vBucket, transcoder, opaque, timeout)
 {
 }
Exemplo n.º 36
0
 public Hello(string key, short[] value, ITypeTranscoder transcoder, uint opaque, uint timeout)
     : base(key, value, null, transcoder, opaque, timeout)
 {
 }
Exemplo n.º 37
0
 public SelectBucket(string key, ITypeTranscoder transcoder, uint timeout)
     : base(key, null, transcoder, timeout)
 {
 }
 protected OperationBase(string key, IVBucket vBucket, ITypeTranscoder transcoder, uint timeout)
     : this(key, default(T), vBucket, transcoder, SequenceGenerator.GetNext(), timeout)
 {
 }
Exemplo n.º 39
0
 public ClusterNode(ClusterContext context, ITypeTranscoder transcoder, ICircuitBreaker circuitBreaker)
 {
     _context        = context;
     _transcoder     = transcoder;
     _circuitBreaker = circuitBreaker;
 }
Exemplo n.º 40
0
 public GetReplicaResult(IMemoryOwner <byte> contentBytes, ITypeTranscoder transcoder)
     : base(contentBytes, transcoder)
 {
 }
 public FakeSubDocumentOperation(ISubDocBuilder <T> builder, string key, IVBucket vBucket, ITypeTranscoder transcoder, uint timeout)
     : base(builder, key, vBucket, transcoder, timeout)
 {
 }
Exemplo n.º 42
0
 private ReplicaRead(string key, ITypeTranscoder transcoder, IVBucket vBucket, uint opaque, uint timeout)
     : base(key, default(T), vBucket, transcoder, opaque, timeout)
 {
 }
 /// <summary>
 /// Creates a <see cref="CramMd5Mechanism"/> object using a given <see cref="IOService"/>.
 /// </summary>
 /// <param name="ioService">The I/O service to use.</param>
 /// <param name="transcoder"></param>
 public CramMd5Mechanism(IIOService ioService, ITypeTranscoder transcoder)
 {
     _ioService = ioService;
     _transcoder = transcoder;
 }
Exemplo n.º 44
0
 public ReplicaRead(string key, IVBucket vBucket, ITypeTranscoder transcoder, uint timeout)
     : base(key, vBucket, transcoder, timeout)
 {
 }
Exemplo n.º 45
0
 public MultiMutation(string key, MutateInBuilder <T> mutateInBuilder, IVBucket vBucket, ITypeTranscoder transcoder, uint timeout)
     : base(key, vBucket, transcoder, timeout)
 {
     _builder = mutateInBuilder;
     Cas      = _builder.Cas;
 }
Exemplo n.º 46
0
        public static async Task SelectBucket(this IConnection connection, string bucketName, ITypeTranscoder transcoder)
        {
            var completionSource = new TaskCompletionSource <bool>();

            using var selectBucketOp = new SelectBucket
                  {
                      Transcoder = transcoder,
                      Key        = bucketName,
                      Completed  = s =>
                      {
                          completionSource.TrySetResult(s.Status == ResponseStatus.Success);
                          return(completionSource.Task);
                      }
                  };
            await selectBucketOp.SendAsync(connection).ConfigureAwait(false);
        }
Exemplo n.º 47
0
 protected GetK(string key, IVBucket vBucket, ITypeTranscoder transcoder, uint opaque, uint timeout)
     : base(key, vBucket, transcoder, opaque, timeout)
 {
 }
 /// <summary>
 /// Creates a <see cref="CramMd5Mechanism"/> object using a given <see cref="IOStrategy"/>.
 /// </summary>
 /// <param name="ioStrategy">The I/O strategy to use.</param>
 /// <param name="transcoder"></param>
 public CramMd5Mechanism(IOStrategy ioStrategy, ITypeTranscoder transcoder)
 {
     _ioStrategy = ioStrategy;
     _transcoder = transcoder;
 }
Exemplo n.º 49
0
 public SaslStep(string key, string value, ITypeTranscoder transcoder, IVBucket vBucket, uint opaque, uint timeout)
     : base(key, value, vBucket, transcoder, opaque, timeout)
 {
 }
 protected MutationOperationBase(string key, IVBucket vBucket, ITypeTranscoder transcoder, uint timeout)
     : base(key, vBucket, transcoder, timeout)
 {
 }
Exemplo n.º 51
0
 public SaslStep(string key, string value, ITypeTranscoder transcoder, uint timeout)
     : base(key, value, null, transcoder, SequenceGenerator.GetNext(), timeout)
 {
 }
Exemplo n.º 52
0
 public Increment(string key, ulong initial, ulong delta, uint expiration, IVBucket vBucket, IByteConverter converter, ITypeTranscoder transcoder)
     : base(key, vBucket, converter, transcoder)
 {
     _delta      = delta;
     _initial    = initial;
     _expiration = expiration;
 }
Exemplo n.º 53
0
        internal static async Task <uint?> GetCid(this IConnection connection, string name, ITypeTranscoder transcoder)
        {
            var completionSource = new TaskCompletionSource <IMemoryOwner <byte> >();

            using var getCid = new GetCid
                  {
                      Key        = name,
                      Transcoder = transcoder,
                      Opaque     = SequenceGenerator.GetNext(),
                      Content    = null,
                      Completed  = s =>
                      {
                          completionSource.TrySetResult(s.ExtractData());
                          return(completionSource.Task);
                      }
                  };
            await getCid.SendAsync(connection).ConfigureAwait(false);

            var gitCidBytes = await completionSource.Task.ConfigureAwait(false);

            await getCid.ReadAsync(gitCidBytes).ConfigureAwait(false);

            var resultWithValue = getCid.GetResultWithValue();

            return(resultWithValue.Content);
        }
Exemplo n.º 54
0
 public Add(string key, T value, ulong cas, IVBucket vBucket, ITypeTranscoder transcoder, uint timeout)
     : base(key, value, vBucket, transcoder, SequenceGenerator.GetNext(), timeout)
 {
     Cas = cas;
 }
Exemplo n.º 55
0
        internal static async Task <Manifest> GetManifest(this IConnection connection, ITypeTranscoder transcoder)
        {
            var completionSource = new TaskCompletionSource <IMemoryOwner <byte> >();

            using var manifestOp = new GetManifest
                  {
                      Transcoder = transcoder,
                      Opaque     = SequenceGenerator.GetNext(),
                      Completed  = s =>
                      {
                          completionSource.TrySetResult(s.ExtractData());
                          return(completionSource.Task);
                      }
                  };
            await manifestOp.SendAsync(connection).ConfigureAwait(false);

            var manifestBytes = await completionSource.Task.ConfigureAwait(false);

            await manifestOp.ReadAsync(manifestBytes).ConfigureAwait(false);

            var manifestResult = manifestOp.GetResultWithValue();

            return(manifestResult.Content);
        }
Exemplo n.º 56
0
        public ClusterNode(ClusterContext context, IConnectionPoolFactory connectionPoolFactory, ILogger <ClusterNode> logger, ITypeTranscoder transcoder, ICircuitBreaker circuitBreaker, ISaslMechanismFactory saslMechanismFactory, IRedactor redactor, IPEndPoint endPoint, BucketType bucketType, NodeAdapter nodeAdapter, IRequestTracer tracer)
        {
            _context              = context ?? throw new ArgumentNullException(nameof(context));
            _logger               = logger ?? throw new ArgumentNullException(nameof(logger));
            _transcoder           = transcoder ?? throw new ArgumentNullException(nameof(transcoder));
            _circuitBreaker       = circuitBreaker ?? throw new ArgumentException(nameof(circuitBreaker));
            _saslMechanismFactory = saslMechanismFactory ?? throw new ArgumentException(nameof(saslMechanismFactory));
            _redactor             = redactor ?? throw new ArgumentNullException(nameof(redactor));
            _tracer               = tracer;
            BucketType            = bucketType;
            EndPoint              = endPoint ?? throw new ArgumentNullException(nameof(endPoint));

            _cachedToString = $"{EndPoint}-{_id}";

            KeyEndPoints = new ReadOnlyObservableCollection <IPEndPoint>(_keyEndPoints);
            UpdateKeyEndPoints();
            ((INotifyCollectionChanged)_keyEndPoints).CollectionChanged += (_, e) => OnKeyEndPointsChanged(e);

            if (connectionPoolFactory == null)
            {
                throw new ArgumentNullException(nameof(connectionPoolFactory));
            }

            ConnectionPool = connectionPoolFactory.Create(this);

            if (nodeAdapter != null)
            {
                NodesAdapter = nodeAdapter;
            }
        }
Exemplo n.º 57
0
 /// <summary>
 /// Creates a <see cref="CramMd5Mechanism"/> object using a given <see cref="IOService"/>.
 /// </summary>
 /// <param name="ioService">The I/O service to use.</param>
 /// <param name="transcoder"></param>
 public CramMd5Mechanism(IIOService ioService, ITypeTranscoder transcoder, ILoggerFactory loggerFactory)
 {
     _ioService = ioService;
     _transcoder = transcoder;
     Log = loggerFactory.CreateLogger<CramMd5Mechanism>();
 }
Exemplo n.º 58
0
 public SubExists(LookupInBuilder <T> builder, string key, IVBucket vBucket, ITypeTranscoder transcoder, uint timeout)
     : base(builder, key, vBucket, transcoder, timeout)
 {
     CurrentSpec = builder.FirstSpec();
     Path        = CurrentSpec.Path;
 }
Exemplo n.º 59
0
 public Unlock(string key, ITypeTranscoder transcoder, IVBucket vBucket, uint timeout)
     : base(key, vBucket, transcoder, timeout)
 {
 }
 protected OperationBase(string key, T value, IVBucket vBucket, ITypeTranscoder transcoder, uint opaque, uint timeout)
     : base(key, vBucket, transcoder, opaque, timeout)
 {
     _value = value;
 }