123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466 |
- using StackExchange.Redis;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace OASystem.RedisRepository.RedisAsyncHelper
- {
-
-
-
-
- public partial interface IRedisHelper
- {
- #region Redis数据类型—String
-
-
-
-
-
-
-
-
- Task<bool> StringSetAsync<T>(string key, T value, TimeSpan? timeout = null);
-
-
-
-
-
-
- Task<long> StringDecrementAsync(string key, long value = 1L);
-
-
-
-
-
-
- Task<long> StringIncrementAsync(string key, long value = 1L);
-
-
-
-
-
-
- Task<T> StringGetAsync<T>(string key);
- #endregion
- #region Redis数据类型—Hash
-
-
-
-
-
-
-
-
- Task<bool> HashSetAsync<T>(string key, string field, T value);
-
-
-
-
-
-
-
- Task HashMultiSetAsync<T>(string key, Dictionary<string, T> hashFields);
-
-
-
-
-
-
-
-
- Task<long> HashIncrementAsync(string key, string field, long incrCount = 1);
-
-
-
-
-
-
-
-
- Task<long> HashDecrementAsync(string key, string field, long decrCount = 1);
-
-
-
-
-
-
-
- Task<bool> HashDeleteFieldAsync(string key, string field);
-
-
-
-
-
-
-
- Task<long> HashMultiDeleteFieldAsync(string key, List<string> fields);
-
-
-
-
-
-
-
- Task<T> HashGetAsync<T>(string key, string field);
-
-
-
-
-
-
- Task<bool> HashFieldExistAsync(string key, string field);
-
-
-
-
-
-
- Task<List<T>> HashValuesAsync<T>(string key);
-
-
-
-
-
-
- Task<Dictionary<string, T>> HashGetAllAsync<T>(string key);
-
-
-
-
-
- Task<List<string>> HashFieldsAsync(string key);
- #endregion
- #region Redis数据类型—List
-
-
-
-
-
-
-
-
-
-
- Task<long> ListInsertAfterAsync<T>(string key, string pivot, T value);
-
-
-
-
-
-
-
-
-
-
- Task<long> ListInsertBeforeAsync<T>(string key, string pivot, T value);
-
-
-
-
-
-
-
- Task<T> ListLeftPopAsync<T>(string key);
-
-
-
-
-
-
-
- Task<long> ListLeftPushAsync<T>(string key, T value);
-
-
-
-
-
-
-
- Task<long> ListLeftMultiPushAsync<T>(string key, List<T> values);
-
-
-
-
-
-
- Task<long> ListLengthAsync<T>(string key);
-
-
-
-
-
-
-
-
-
-
- Task<List<T>> ListRangeAsync<T>(string key, long start = 0L, long stop = -1L);
-
-
-
-
-
-
-
-
- Task<long> ListRemoveAsync<T>(string key, T value, long count = 0L);
-
-
-
-
-
-
- Task<T> ListRightPopAsync<T>(string key);
-
-
-
-
-
-
-
- Task<long> ListRightPushAsync<T>(string key, T value);
-
-
-
-
-
-
-
- Task<long> ListRightMultiPushAsync<T>(string key, List<T> values);
-
-
-
-
-
-
-
-
-
- Task ListSetByIndexAsync<T>(string key, int index, T value);
-
-
-
-
-
-
-
- Task ListTrimAsync(string key, long start, long stop);
-
-
-
-
-
-
-
- Task<T> ListGetByIndexAsync<T>(string key, long index);
- #endregion
- #region Redis数据类型—Set
-
-
-
-
-
-
-
- Task<bool> SetAddAsync<T>(string key, T value);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- #endregion
- #region Redis数据类型—SortSet
- #endregion
- #region Redis Key操作
-
-
-
-
-
- Task<bool> KeyDeleteAsync(string key);
-
-
-
-
-
-
-
-
-
-
-
-
-
- Task<bool> KeyExpireInAsync(string key, TimeSpan timeout);
-
-
-
-
-
-
- Task<bool> KeyRenameAsync(string key, string newKey);
-
-
-
-
-
- Task<bool> KeyExistsAsync(string key);
- #endregion
- #region Redis Transcation
-
-
-
-
-
-
- #endregion
- }
- }
|