|
2 | 2 | using System.Collections.Generic;
|
3 | 3 | using System.Linq;
|
4 | 4 | using System.Text;
|
| 5 | +using System.Threading.Tasks; |
5 | 6 | using Enyim.Caching.Memcached;
|
6 | 7 | using Enyim.Caching.Memcached.Results;
|
7 | 8 |
|
8 | 9 | namespace Enyim.Caching
|
9 | 10 | {
|
10 |
| - /// <summary> |
11 |
| - /// Interface for API methods that return detailed operation results |
12 |
| - /// </summary> |
13 |
| - public interface IMemcachedResultsClient |
14 |
| - { |
15 |
| - IGetOperationResult ExecuteGet(string key); |
16 |
| - IGetOperationResult<T> ExecuteGet<T>(string key); |
17 |
| - IDictionary<string, IGetOperationResult> ExecuteGet(IEnumerable<string> keys); |
| 11 | + /// <summary> |
| 12 | + /// Interface for API methods that return detailed operation results |
| 13 | + /// </summary> |
| 14 | + public interface IMemcachedResultsClient |
| 15 | + { |
| 16 | + IGetOperationResult ExecuteGet(string key); |
| 17 | + IGetOperationResult<T> ExecuteGet<T>(string key); |
| 18 | + IDictionary<string, IGetOperationResult> ExecuteGet(IEnumerable<string> keys); |
18 | 19 |
|
19 |
| - IGetOperationResult ExecuteTryGet(string key, out object value); |
20 |
| - |
21 |
| - IStoreOperationResult ExecuteStore(StoreMode mode, string key, object value); |
22 |
| - IStoreOperationResult ExecuteStore(StoreMode mode, string key, object value, DateTime expiresAt); |
23 |
| - IStoreOperationResult ExecuteStore(StoreMode mode, string key, object value, TimeSpan validFor); |
| 20 | + IGetOperationResult ExecuteTryGet(string key, out object value); |
24 | 21 |
|
25 |
| - IStoreOperationResult ExecuteCas(StoreMode mode, string key, object value); |
26 |
| - IStoreOperationResult ExecuteCas(StoreMode mode, string key, object value, ulong cas); |
27 |
| - IStoreOperationResult ExecuteCas(StoreMode mode, string key, object value, DateTime expiresAt, ulong cas); |
28 |
| - IStoreOperationResult ExecuteCas(StoreMode mode, string key, object value, TimeSpan validFor, ulong cas); |
| 22 | + IStoreOperationResult ExecuteStore(StoreMode mode, string key, object value); |
| 23 | + IStoreOperationResult ExecuteStore(StoreMode mode, string key, object value, DateTime expiresAt); |
| 24 | + IStoreOperationResult ExecuteStore(StoreMode mode, string key, object value, TimeSpan validFor); |
29 | 25 |
|
30 |
| - IMutateOperationResult ExecuteDecrement(string key, ulong defaultValue, ulong delta); |
31 |
| - IMutateOperationResult ExecuteDecrement(string key, ulong defaultValue, ulong delta, DateTime expiresAt); |
32 |
| - IMutateOperationResult ExecuteDecrement(string key, ulong defaultValue, ulong delta, TimeSpan validFor); |
| 26 | + IStoreOperationResult ExecuteCas(StoreMode mode, string key, object value); |
| 27 | + IStoreOperationResult ExecuteCas(StoreMode mode, string key, object value, ulong cas); |
| 28 | + IStoreOperationResult ExecuteCas(StoreMode mode, string key, object value, DateTime expiresAt, ulong cas); |
| 29 | + IStoreOperationResult ExecuteCas(StoreMode mode, string key, object value, TimeSpan validFor, ulong cas); |
33 | 30 |
|
34 |
| - IMutateOperationResult ExecuteDecrement(string key, ulong defaultValue, ulong delta, ulong cas); |
35 |
| - IMutateOperationResult ExecuteDecrement(string key, ulong defaultValue, ulong delta, DateTime expiresAt, ulong cas); |
36 |
| - IMutateOperationResult ExecuteDecrement(string key, ulong defaultValue, ulong delta, TimeSpan validFor, ulong cas); |
37 |
| - |
38 |
| - IMutateOperationResult ExecuteIncrement(string key, ulong defaultValue, ulong delta); |
39 |
| - IMutateOperationResult ExecuteIncrement(string key, ulong defaultValue, ulong delta, DateTime expiresAt); |
40 |
| - IMutateOperationResult ExecuteIncrement(string key, ulong defaultValue, ulong delta, TimeSpan validFor); |
| 31 | + IMutateOperationResult ExecuteDecrement(string key, ulong defaultValue, ulong delta); |
| 32 | + IMutateOperationResult ExecuteDecrement(string key, ulong defaultValue, ulong delta, DateTime expiresAt); |
| 33 | + IMutateOperationResult ExecuteDecrement(string key, ulong defaultValue, ulong delta, TimeSpan validFor); |
41 | 34 |
|
42 |
| - IMutateOperationResult ExecuteIncrement(string key, ulong defaultValue, ulong delta, ulong cas); |
43 |
| - IMutateOperationResult ExecuteIncrement(string key, ulong defaultValue, ulong delta, DateTime expiresAt, ulong cas); |
44 |
| - IMutateOperationResult ExecuteIncrement(string key, ulong defaultValue, ulong delta, TimeSpan validFor, ulong cas); |
| 35 | + IMutateOperationResult ExecuteDecrement(string key, ulong defaultValue, ulong delta, ulong cas); |
| 36 | + IMutateOperationResult ExecuteDecrement(string key, ulong defaultValue, ulong delta, DateTime expiresAt, ulong cas); |
| 37 | + IMutateOperationResult ExecuteDecrement(string key, ulong defaultValue, ulong delta, TimeSpan validFor, ulong cas); |
45 | 38 |
|
46 |
| - IConcatOperationResult ExecuteAppend(string key, ArraySegment<byte> data); |
47 |
| - IConcatOperationResult ExecuteAppend(string key, ulong cas, ArraySegment<byte> data); |
48 |
| - |
49 |
| - IConcatOperationResult ExecutePrepend(string key, ArraySegment<byte> data); |
50 |
| - IConcatOperationResult ExecutePrepend(string key, ulong cas, ArraySegment<byte> data); |
| 39 | + IMutateOperationResult ExecuteIncrement(string key, ulong defaultValue, ulong delta); |
| 40 | + IMutateOperationResult ExecuteIncrement(string key, ulong defaultValue, ulong delta, DateTime expiresAt); |
| 41 | + IMutateOperationResult ExecuteIncrement(string key, ulong defaultValue, ulong delta, TimeSpan validFor); |
51 | 42 |
|
52 |
| - IRemoveOperationResult ExecuteRemove(string key); |
53 |
| - } |
| 43 | + IMutateOperationResult ExecuteIncrement(string key, ulong defaultValue, ulong delta, ulong cas); |
| 44 | + IMutateOperationResult ExecuteIncrement(string key, ulong defaultValue, ulong delta, DateTime expiresAt, ulong cas); |
| 45 | + IMutateOperationResult ExecuteIncrement(string key, ulong defaultValue, ulong delta, TimeSpan validFor, ulong cas); |
| 46 | + |
| 47 | + IConcatOperationResult ExecuteAppend(string key, ArraySegment<byte> data); |
| 48 | + IConcatOperationResult ExecuteAppend(string key, ulong cas, ArraySegment<byte> data); |
| 49 | + |
| 50 | + IConcatOperationResult ExecutePrepend(string key, ArraySegment<byte> data); |
| 51 | + IConcatOperationResult ExecutePrepend(string key, ulong cas, ArraySegment<byte> data); |
| 52 | + |
| 53 | + IRemoveOperationResult ExecuteRemove(string key); |
| 54 | + Task<IRemoveOperationResult> ExecuteRemoveAsync(string key); |
| 55 | + } |
54 | 56 | }
|
55 | 57 |
|
56 | 58 | #region [ License information ]
|
|
0 commit comments