Exemplo n.º 1
0
        public async Task <bool> ExecuteTransactionAsync(ITransaction trans)
        {
            var result = await RetryPolicyAsync.ExecuteAsync(() => trans.ExecuteAsync()).ConfigureAwait(false);

            return(result);
        }
Exemplo n.º 2
0
        public async Task <RedisValue[]> SetMembersAsync(RedisKey key)
        {
            var members = await RetryPolicyAsync.ExecuteAsync(() => Database.SetMembersAsync(key)).ConfigureAwait(false);

            return(members);
        }
Exemplo n.º 3
0
 public async Task HashIncrementAsync(string key, string field)
 {
     await RetryPolicyAsync.ExecuteAsync(() => Database.HashIncrementAsync(key, field)).ConfigureAwait(false);
 }
Exemplo n.º 4
0
        public async Task <HashEntry[]> HashGetAllAsync(string key)
        {
            var result = await RetryPolicyAsync.ExecuteAsync(() => Database.HashGetAllAsync(key)).ConfigureAwait(false);

            return(result);
        }
Exemplo n.º 5
0
 public async Task HashSetAsync(RedisKey key, HashEntry[] value)
 {
     await RetryPolicyAsync.ExecuteAsync(() => Database.HashSetAsync(key, value)).ConfigureAwait(false);
 }
Exemplo n.º 6
0
 public async Task SubscribeAsync(RedisChannel channel, Action <RedisChannel, RedisValue> handler)
 {
     await RetryPolicyAsync.ExecuteAsync(() => Subscriber.SubscribeAsync(channel, handler)).ConfigureAwait(false);
 }
Exemplo n.º 7
0
        public async Task <bool> HashExistsAsync(string key, string field)
        {
            var result = await RetryPolicyAsync.ExecuteAsync(() => Database.HashExistsAsync(key, field)).ConfigureAwait(false);

            return(result);
        }
Exemplo n.º 8
0
        public async Task <RedisValue> HashGetAsync(RedisKey key, RedisValue value)
        {
            var hashValue = await RetryPolicyAsync.ExecuteAsync(() => Database.HashGetAsync(key, value)).ConfigureAwait(false);

            return(hashValue);
        }
Exemplo n.º 9
0
        public async Task <bool> KeyExistsAsync(string key)
        {
            var result = await RetryPolicyAsync.ExecuteAsync(() => Database.KeyExistsAsync(key)).ConfigureAwait(false);

            return(result);
        }
Exemplo n.º 10
0
 public async Task KeyExpireAsync(string key, TimeSpan expiry)
 {
     await RetryPolicyAsync.ExecuteAsync(() => Database.KeyExpireAsync(key, expiry)).ConfigureAwait(false);
 }
Exemplo n.º 11
0
 public async Task KeyDeleteAsync(string key)
 {
     await RetryPolicyAsync.ExecuteAsync(() => Database.KeyDeleteAsync(key)).ConfigureAwait(false);
 }
Exemplo n.º 12
0
        public async Task <bool> StringSetAsync(string key, string value, TimeSpan?expiry = null)
        {
            var result = await RetryPolicyAsync.ExecuteAsync(() => Database.StringSetAsync(key, value, expiry)).ConfigureAwait(false);

            return(result);
        }
Exemplo n.º 13
0
        public async Task <string> StringGetAsync(string key)
        {
            var result = await RetryPolicyAsync.ExecuteAsync(() => Database.StringGetAsync(key)).ConfigureAwait(false);

            return(result);
        }
Exemplo n.º 14
0
        public async Task <long> ListRightPushAsync(RedisKey key, RedisValue value)
        {
            var result = await RetryPolicyAsync.ExecuteAsync(() => Database.ListRightPushAsync(key, value)).ConfigureAwait(false);

            return(result);
        }
Exemplo n.º 15
0
        public async Task <long> ListRemoveAsync(string key, string value, long count)
        {
            var result = await RetryPolicyAsync.ExecuteAsync(() => Database.ListRemoveAsync(key, value, count)).ConfigureAwait(false);

            return(result);
        }
Exemplo n.º 16
0
        public async Task <RedisValue[]> ListRangeAsync(RedisKey key, long start, long stop)
        {
            var range = await RetryPolicyAsync.ExecuteAsync(() => Database.ListRangeAsync(key, start, stop)).ConfigureAwait(false);

            return(range);
        }
Exemplo n.º 17
0
        public async Task <string> ListGetByIndexAsync(string key, int index)
        {
            var result = await RetryPolicyAsync.ExecuteAsync(() => Database.ListGetByIndexAsync(key, index)).ConfigureAwait(false);

            return(result);
        }
Exemplo n.º 18
0
        public async Task <long> HashLengthAsync(RedisKey key)
        {
            var length = await RetryPolicyAsync.ExecuteAsync(() => Database.HashLengthAsync(key)).ConfigureAwait(false);

            return(length);
        }
Exemplo n.º 19
0
 public async Task ListRemoveAsync(string key, RedisValue value)
 {
     await RetryPolicyAsync.ExecuteAsync(() => Database.ListRemoveAsync(key, value)).ConfigureAwait(false);
 }
Exemplo n.º 20
0
        public async Task <bool> SetAddAsync(RedisKey key, RedisValue value)
        {
            var result = await RetryPolicyAsync.ExecuteAsync(() => Database.SetAddAsync(key, value)).ConfigureAwait(false);

            return(result);
        }
Exemplo n.º 21
0
 public async Task PublishAsync(RedisChannel channel, RedisValue value)
 {
     await RetryPolicyAsync.ExecuteAsync(() => Subscriber.PublishAsync(channel, value)).ConfigureAwait(false);
 }