This repository has been archived by the owner on Jul 7, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 360
/
IMemcachedClient.cs
60 lines (45 loc) · 2.5 KB
/
IMemcachedClient.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
using System;
using Enyim.Caching.Memcached;
using System.Collections.Generic;
namespace Enyim.Caching
{
public interface IMemcachedClient : IDisposable
{
object Get(string key);
T Get<T>(string key);
IDictionary<string, object> Get(IEnumerable<string> keys);
bool TryGet(string key, out object value);
bool TryGetWithCas(string key, out CasResult<object> value);
CasResult<object> GetWithCas(string key);
CasResult<T> GetWithCas<T>(string key);
IDictionary<string, CasResult<object>> GetWithCas(IEnumerable<string> keys);
bool Append(string key, ArraySegment<byte> data);
CasResult<bool> Append(string key, ulong cas, ArraySegment<byte> data);
bool Prepend(string key, ArraySegment<byte> data);
CasResult<bool> Prepend(string key, ulong cas, ArraySegment<byte> data);
bool Store(StoreMode mode, string key, object value);
bool Store(StoreMode mode, string key, object value, DateTime expiresAt);
bool Store(StoreMode mode, string key, object value, TimeSpan validFor);
CasResult<bool> Cas(StoreMode mode, string key, object value);
CasResult<bool> Cas(StoreMode mode, string key, object value, ulong cas);
CasResult<bool> Cas(StoreMode mode, string key, object value, DateTime expiresAt, ulong cas);
CasResult<bool> Cas(StoreMode mode, string key, object value, TimeSpan validFor, ulong cas);
ulong Decrement(string key, ulong defaultValue, ulong delta);
ulong Decrement(string key, ulong defaultValue, ulong delta, DateTime expiresAt);
ulong Decrement(string key, ulong defaultValue, ulong delta, TimeSpan validFor);
CasResult<ulong> Decrement(string key, ulong defaultValue, ulong delta, ulong cas);
CasResult<ulong> Decrement(string key, ulong defaultValue, ulong delta, DateTime expiresAt, ulong cas);
CasResult<ulong> Decrement(string key, ulong defaultValue, ulong delta, TimeSpan validFor, ulong cas);
ulong Increment(string key, ulong defaultValue, ulong delta);
ulong Increment(string key, ulong defaultValue, ulong delta, DateTime expiresAt);
ulong Increment(string key, ulong defaultValue, ulong delta, TimeSpan validFor);
CasResult<ulong> Increment(string key, ulong defaultValue, ulong delta, ulong cas);
CasResult<ulong> Increment(string key, ulong defaultValue, ulong delta, DateTime expiresAt, ulong cas);
CasResult<ulong> Increment(string key, ulong defaultValue, ulong delta, TimeSpan validFor, ulong cas);
bool Remove(string key);
void FlushAll();
ServerStats Stats();
ServerStats Stats(string type);
event Action<IMemcachedNode> NodeFailed;
}
}