• StackService.Redis.RedisNativeClient.cs


    ylbtech-StackService.Redis.RedisNativeClient.cs
    1.返回顶部
    1、
    #region 程序集 ServiceStack.Redis, Version=3.9.71.0, Culture=neutral, PublicKeyToken=null
    // D:labsp
    eposSolution4ConsoleRedis3inDebugServiceStack.Redis.dll
    #endregion
    
    using System;
    using System.Collections.Generic;
    using System.Diagnostics;
    using System.IO;
    using System.Net.Sockets;
    using ServiceStack.Redis.Pipeline;
    
    namespace ServiceStack.Redis
    {
        //
        // 摘要:
        //     This class contains all the common operations for the RedisClient. The client
        //     contains a 1:1 mapping of c# methods to redis operations of the same name. Not
        //     threadsafe use a pooled manager
        public class RedisNativeClient : IRedisNativeClient, IDisposable
        {
            public const long DefaultDb = 0;
            public const int DefaultPort = 6379;
            public const string DefaultHost = "localhost";
            public const int DefaultIdleTimeOutSecs = 240;
            protected Socket socket;
            protected BufferedStream Bstream;
    
            public RedisNativeClient();
            public RedisNativeClient(string host);
            public RedisNativeClient(string host, int port);
            public RedisNativeClient(string host, int port, string password = null, long db = 0);
    
            ~RedisNativeClient();
    
            public bool HadExceptions { get; protected set; }
            public long Id { get; set; }
            public string Host { get; }
            public int Port { get; }
            //
            // 摘要:
            //     Gets or sets object key prefix.
            public string NamespacePrefix { get; set; }
            public int ConnectTimeout { get; set; }
            public int RetryTimeout { get; set; }
            public Action<IRedisNativeClient> ConnectionFilter { get; set; }
            public int SendTimeout { get; set; }
            public int ReceiveTimeout { get; set; }
            public string Password { get; set; }
            public int IdleTimeOutSecs { get; set; }
            public long Db { get; set; }
            public long DbSize { get; }
            public DateTime LastSave { get; }
            public int RetryCount { get; set; }
            public Dictionary<string, string> Info { get; }
            public string ServerVersion { get; }
    
            public static double ParseDouble(byte[] doubleBytes);
            public long Append(string key, byte[] value);
            public void BgRewriteAof();
            public void BgSave();
            public long BitCount(string key);
            public byte[][] BLPop(string[] listIds, int timeOutSecs);
            public byte[][] BLPop(string listId, int timeOutSecs);
            public byte[] BLPopValue(string listId, int timeOutSecs);
            public byte[][] BLPopValue(string[] listIds, int timeOutSecs);
            public byte[][] BRPop(string listId, int timeOutSecs);
            public byte[][] BRPop(string[] listIds, int timeOutSecs);
            public byte[] BRPopLPush(string fromListId, string toListId, int timeOutSecs);
            public byte[] BRPopValue(string listId, int timeOutSecs);
            public byte[][] BRPopValue(string[] listIds, int timeOutSecs);
            public string CalculateSha1(string luaBody);
            public string ClientGetName();
            public void ClientKill(string clientAddr);
            public byte[] ClientList();
            public void ClientSetName(string name);
            public byte[][] ConfigGet(string pattern);
            public void ConfigResetStat();
            public void ConfigSet(string item, byte[] value);
            public RedisPipelineCommand CreatePipelineCommand();
            public void DebugSegfault();
            public long Decr(string key);
            public long DecrBy(string key, int count);
            public long Del(string key);
            public long Del(params string[] keys);
            public void Dispose();
            public byte[] Dump(string key);
            public string Echo(string text);
            public byte[][] Eval(string luaBody, int numberKeysInArgs, params byte[][] keys);
            public long EvalInt(string luaBody, int numberKeysInArgs, params byte[][] keys);
            public byte[][] EvalSha(string sha1, int numberKeysInArgs, params byte[][] keys);
            public long EvalShaInt(string sha1, int numberKeysInArgs, params byte[][] keys);
            public string EvalShaStr(string sha1, int numberKeysInArgs, params byte[][] keys);
            public string EvalStr(string luaBody, int numberKeysInArgs, params byte[][] keys);
            public long Exists(string key);
            public bool Expire(string key, int seconds);
            public bool ExpireAt(string key, long unixTime);
            public void FlushAll();
            public void FlushDb();
            public void FlushSendBuffer();
            public byte[] Get(string key);
            public long GetBit(string key, int offset);
            public byte[] GetBytes(string key);
            public RedisKeyType GetEntryType(string key);
            public byte[] GetRange(string key, int fromIndex, int toIndex);
            public byte[] GetSet(string key, byte[] value);
            public long HDel(string hashId, byte[] key);
            public long HDel(string hashId, byte[][] keys);
            public long HExists(string hashId, byte[] key);
            public byte[] HGet(string hashId, byte[] key);
            public byte[][] HGetAll(string hashId);
            public long HIncrby(string hashId, byte[] key, int incrementBy);
            public long HIncrby(string hashId, byte[] key, long incrementBy);
            public double HIncrbyFloat(string hashId, byte[] key, double incrementBy);
            public byte[][] HKeys(string hashId);
            public long HLen(string hashId);
            public byte[][] HMGet(string hashId, params byte[][] keys);
            public void HMSet(string hashId, byte[][] keys, byte[][] values);
            public long HSet(string hashId, byte[] key, byte[] value);
            public long HSetNX(string hashId, byte[] key, byte[] value);
            public byte[][] HVals(string hashId);
            public long Incr(string key);
            public long IncrBy(string key, int count);
            public double IncrByFloat(string key, double incrBy);
            public bool IsSocketConnected();
            public byte[][] Keys(string pattern);
            public byte[] LIndex(string listId, int listIndex);
            public void LInsert(string listId, bool insertBefore, byte[] pivot, byte[] value);
            public long LLen(string listId);
            public byte[] LPop(string listId);
            public long LPush(string listId, byte[] value);
            public long LPush(string listId, byte[][] values);
            public long LPushX(string listId, byte[] value);
            public byte[][] LRange(string listId, int startingFrom, int endingAt);
            public long LRem(string listId, int removeNoOfMatches, byte[] value);
            public void LSet(string listId, int listIndex, byte[] value);
            public void LTrim(string listId, int keepStartingFrom, int keepEndingAt);
            public byte[][] MGet(params byte[][] keys);
            public byte[][] MGet(params string[] keys);
            public void Migrate(string host, int port, int destinationDb, long timeoutMs);
            public bool Move(string key, int db);
            public void MSet(byte[][] keys, byte[][] values);
            public void MSet(string[] keys, byte[][] values);
            public bool MSetNx(byte[][] keys, byte[][] values);
            public bool MSetNx(string[] keys, byte[][] values);
            public long ObjectIdleTime(string key);
            public bool Persist(string key);
            public bool PExpire(string key, long ttlMs);
            public bool PExpireAt(string key, long unixTimeMs);
            public bool Ping();
            public void PSetEx(string key, long expireInMs, byte[] value);
            public byte[][] PSubscribe(params string[] toChannelsMatchingPatterns);
            public long PTtl(string key);
            public long Publish(string toChannel, byte[] message);
            public byte[][] PUnSubscribe(params string[] fromChannelsMatchingPatterns);
            public void Quit();
            public string RandomKey();
            public double ReadDouble();
            public long ReadInt();
            public long ReadLong();
            public byte[][] ReceiveMessages();
            public void Rename(string oldKeyname, string newKeyname);
            public bool RenameNx(string oldKeyname, string newKeyname);
            //
            // 摘要:
            //     reset buffer index in send buffer
            public void ResetSendBuffer();
            public byte[] Restore(string key, long expireMs, byte[] dumpValue);
            public byte[] RPop(string listId);
            public byte[] RPopLPush(string fromListId, string toListId);
            public long RPush(string listId, byte[][] values);
            public long RPush(string listId, byte[] value);
            public long RPushX(string listId, byte[] value);
            public long SAdd(string setId, byte[] value);
            public long SAdd(string setId, byte[][] values);
            public void Save();
            public void SaveAsync();
            public long SCard(string setId);
            public byte[][] ScriptExists(params byte[][] sha1Refs);
            public void ScriptFlush();
            public void ScriptKill();
            public byte[] ScriptLoad(string luaBody);
            public byte[][] SDiff(string fromSetId, params string[] withSetIds);
            public void SDiffStore(string intoSetId, string fromSetId, params string[] withSetIds);
            public void Set(string key, byte[] value, int expirySeconds, long expiryMs = 0, bool? exists = null);
            public void Set(string key, byte[] value);
            public long SetBit(string key, int offset, int value);
            public void SetEx(string key, int expireInSeconds, byte[] value);
            public long SetNX(string key, byte[] value);
            public long SetRange(string key, int offset, byte[] value);
            public void Shutdown();
            public byte[][] SInter(params string[] setIds);
            public void SInterStore(string intoSetId, params string[] setIds);
            public long SIsMember(string setId, byte[] value);
            public void SlaveOf(string hostname, int port);
            public void SlaveOfNoOne();
            public object[] Slowlog(int? top);
            public void SlowlogReset();
            public byte[][] SMembers(string setId);
            public void SMove(string fromSetId, string toSetId, byte[] value);
            public byte[][] Sort(string listOrSetId, SortOptions sortOptions);
            public byte[] SPop(string setId);
            public byte[] SRandMember(string setId);
            public byte[][] SRandMember(string setId, int count);
            public long SRem(string setId, byte[] value);
            public long SRem(string setId, byte[][] values);
            public long StrLen(string key);
            public byte[][] Subscribe(params string[] toChannels);
            public byte[] Substr(string key, int fromIndex, int toIndex);
            public byte[][] SUnion(params string[] setIds);
            public void SUnionStore(string intoSetId, params string[] setIds);
            public byte[][] Time();
            public long Ttl(string key);
            public string Type(string key);
            public byte[][] UnSubscribe(params string[] fromChannels);
            public void UnWatch();
            public void Watch(params string[] keys);
            public void WriteAllToSendBuffer(params byte[][] cmdWithBinaryArgs);
            public void WriteToSendBuffer(byte[] cmdBytes);
            public long ZAdd(string setId, List<KeyValuePair<byte[], double>> pairs);
            public long ZAdd(string setId, List<KeyValuePair<byte[], long>> pairs);
            public long ZAdd(string setId, long score, byte[] value);
            public long ZAdd(string setId, double score, byte[] value);
            public long ZCard(string setId);
            public long ZCount(string setId, double min, double max);
            public long ZCount(string setId, long min, long max);
            public double ZIncrBy(string setId, long incrBy, byte[] value);
            public double ZIncrBy(string setId, double incrBy, byte[] value);
            public long ZInterStore(string intoSetId, params string[] setIds);
            public byte[][] ZRange(string setId, int min, int max);
            public byte[][] ZRangeByScore(string setId, double min, double max, int? skip, int? take);
            public byte[][] ZRangeByScore(string setId, long min, long max, int? skip, int? take);
            public byte[][] ZRangeByScoreWithScores(string setId, double min, double max, int? skip, int? take);
            public byte[][] ZRangeByScoreWithScores(string setId, long min, long max, int? skip, int? take);
            public byte[][] ZRangeWithScores(string setId, int min, int max);
            public long ZRank(string setId, byte[] value);
            public long ZRem(string setId, byte[][] values);
            public long ZRem(string setId, byte[] value);
            public long ZRemRangeByRank(string setId, int min, int max);
            public long ZRemRangeByScore(string setId, long fromScore, long toScore);
            public long ZRemRangeByScore(string setId, double fromScore, double toScore);
            public byte[][] ZRevRange(string setId, int min, int max);
            public byte[][] ZRevRangeByScore(string setId, long min, long max, int? skip, int? take);
            public byte[][] ZRevRangeByScore(string setId, double min, double max, int? skip, int? take);
            public byte[][] ZRevRangeByScoreWithScores(string setId, long min, long max, int? skip, int? take);
            public byte[][] ZRevRangeByScoreWithScores(string setId, double min, double max, int? skip, int? take);
            public byte[][] ZRevRangeWithScores(string setId, int min, int max);
            public long ZRevRank(string setId, byte[] value);
            public double ZScore(string setId, byte[] value);
            public long ZUnionStore(string intoSetId, params string[] setIds);
            [Conditional("DEBUG")]
            protected void CmdLog(byte[][] args);
            protected byte[][] ConvertToBytes(string[] keys);
            protected virtual void Dispose(bool disposing);
            protected void ExpectSuccess();
            [Conditional("DEBUG")]
            protected void Log(string fmt, params object[] args);
            protected byte[][] MergeAndConvertToBytes(string[] keys, string[] args);
            protected string ReadLine();
            //
            // 摘要:
            //     Command to set multuple binary safe arguments
            //
            // 参数:
            //   cmdWithBinaryArgs:
            protected bool SendCommand(params byte[][] cmdWithBinaryArgs);
            protected string SendExpectCode(params byte[][] cmdWithBinaryArgs);
            protected byte[] SendExpectData(params byte[][] cmdWithBinaryArgs);
            protected object[] SendExpectDeeplyNestedMultiData(params byte[][] cmdWithBinaryArgs);
            protected double SendExpectDouble(params byte[][] cmdWithBinaryArgs);
            protected long SendExpectLong(params byte[][] cmdWithBinaryArgs);
            protected byte[][] SendExpectMultiData(params byte[][] cmdWithBinaryArgs);
            protected string SendExpectString(params byte[][] cmdWithBinaryArgs);
            protected void SendExpectSuccess(params byte[][] cmdWithBinaryArgs);
        }
    }
    2、 
    3.返回顶部
     
    4.返回顶部
     
    5.返回顶部
     
     
    6.返回顶部
     
    warn 作者:ylbtech
    出处:http://ylbtech.cnblogs.com/
    本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。
  • 相关阅读:
    哈夫曼编码
    20182330《程序设计与设计结构》 第九周学习总结
    20182330 2019-2020-1 《数据结构与面向对象程序设计》实验七报告
    20182330 2019-2020-1 《数据结构与面向对象程序设计》实验八报告
    20182330《程序设计与设计结构》 第八周学习总结
    20182330《程序设计与设计结构》 第七周学习总结
    20182330 2019-2020-1 《数据结构与面向对象程序设计》实验六报告
    20182326 2018-2019-1《程序设计与数据结构》课程总结
    20182326 2019-2020-1 《数据结构与面向对象程序设计》实验九报告
    团队作业——学习心得
  • 原文地址:https://www.cnblogs.com/storebook/p/12673168.html
Copyright © 2020-2023  润新知