Esempio n. 1
0
 public ProtocolEncoder(RedisSettings settings) :
     base(settings)
 {
     _sharedBuffer   = new byte[settings.EncodingBufferSize];
     _encodingBuffer = new byte[settings.EncodingBufferSize];
     _encoding       = settings.EncodingOverride ?? Encoding.UTF8;
 }
Esempio n. 2
0
        public RedisClientBase(RedisSettings settings) :
            base(settings)
        {
            _executor = new ImmediateExecutor();
            _executor.Init(this);

            Reset();
        }
Esempio n. 3
0
 public ProtocolReader(RedisSettings settings, ProtocolEncoder encoder,
                       Stream stream) :
     base(settings)
 {
     _stream  = stream;
     _reader  = new RedisReader(stream, settings);
     _encoder = encoder;
 }
Esempio n. 4
0
        public RedisReader(Stream stream, RedisSettings settings)
        {
            SAssert.ArgumentNotNull(() => stream);
            SAssert.ArgumentSatisfy(() => stream, s => s.CanRead, "Stream must be readable.");
            SAssert.ArgumentNotNull(() => settings);

            _settings = settings;
            _stream   = new BufferedStream(stream, _settings.ReadBufferSize);
        }
Esempio n. 5
0
        public ProtocolWriter(RedisSettings settings, ProtocolEncoder encoder,
                              Stream stream) :
            base(settings)
        {
            _stream  = stream;
            _writer  = new RedisWriter(stream, settings);
            _encoder = encoder;

            AutoFlush = false;
        }
Esempio n. 6
0
        public RedisWriter(Stream stream, RedisSettings settings)
        {
            SAssert.ArgumentNotNull(() => stream);
            SAssert.ArgumentSatisfy(() => stream, s => s.CanWrite, "Stream must be writable.");
            SAssert.ArgumentNotNull(() => settings);

            _settings  = settings;
            _stream    = new BufferedStream(stream, _settings.WriteBufferSize);
            _strBuffer = new byte[_settings.EncodingBufferSize];

            AutoFlush = false;
        }
Esempio n. 7
0
 public RedisClient(RedisSettings settings) : base(settings)
 {
 }
Esempio n. 8
0
 public RedisClientBase(string host = RedisSettings.DefaultHost,
                        int port    = RedisSettings.DefaultPort) :
     this(RedisSettings.Build().Host(host).Port(port))
 {
 }
Esempio n. 9
0
 public ProtocolEncoder(RedisSettings settings)
     : base(settings)
 {
     _buffer = new byte[settings.EncodingBufferSize];
       _encoding = settings.EncodingOverride ?? Encoding.UTF8;
 }
Esempio n. 10
0
 public ThreadwisePool(RedisSettings settings, int?db = null) :
     base(settings, db)
 {
 }
Esempio n. 11
0
 internal Builder(RedisSettings instance)
 {
     _settings = instance;
 }
Esempio n. 12
0
 public Builder()
 {
     _settings = new RedisSettings();
 }
Esempio n. 13
0
 public AutoActivatingPool(RedisSettings settings) :
     base(settings)
 {
 }
Esempio n. 14
0
 internal Builder(RedisSettings instance)
 {
     _settings = instance;
 }
Esempio n. 15
0
 public Builder()
 {
     _settings = new RedisSettings();
 }
Esempio n. 16
0
 public RedisClientBase(RedisSettings settings) :
     base(settings)
 {
     Reset();
 }