forked from nhibernate/nhibernate-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathICache.cs
66 lines (58 loc) · 2.45 KB
/
ICache.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
61
62
63
64
65
66
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by AsyncGenerator.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using System;
namespace NHibernate.Cache
{
using System.Threading.Tasks;
using System.Threading;
public partial interface ICache
{
/// <summary>
/// Get the object from the Cache
/// </summary>
/// <param name="key"></param>
/// <param name="cancellationToken">A cancellation token that can be used to cancel the work</param>
/// <returns></returns>
Task<object> GetAsync(object key, CancellationToken cancellationToken);
/// <summary>
///
/// </summary>
/// <param name="key"></param>
/// <param name="value"></param>
/// <param name="cancellationToken">A cancellation token that can be used to cancel the work</param>
Task PutAsync(object key, object value, CancellationToken cancellationToken);
/// <summary>
/// Remove an item from the Cache.
/// </summary>
/// <param name="key">The Key of the Item in the Cache to remove.</param>
/// <param name="cancellationToken">A cancellation token that can be used to cancel the work</param>
/// <exception cref="CacheException"></exception>
Task RemoveAsync(object key, CancellationToken cancellationToken);
/// <summary>
/// Clear the Cache
/// </summary>
/// <param name="cancellationToken">A cancellation token that can be used to cancel the work</param>
/// <exception cref="CacheException"></exception>
Task ClearAsync(CancellationToken cancellationToken);
/// <summary>
/// If this is a clustered cache, lock the item
/// </summary>
/// <param name="key">The Key of the Item in the Cache to lock.</param>
/// <param name="cancellationToken">A cancellation token that can be used to cancel the work</param>
/// <exception cref="CacheException"></exception>
Task LockAsync(object key, CancellationToken cancellationToken);
/// <summary>
/// If this is a clustered cache, unlock the item
/// </summary>
/// <param name="key">The Key of the Item in the Cache to unlock.</param>
/// <param name="cancellationToken">A cancellation token that can be used to cancel the work</param>
/// <exception cref="CacheException"></exception>
Task UnlockAsync(object key, CancellationToken cancellationToken);
}
}