-
Notifications
You must be signed in to change notification settings - Fork 2k
/
ILogViewAdaptorHost.cs
35 lines (30 loc) · 1.28 KB
/
ILogViewAdaptorHost.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
using Orleans.Runtime;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Orleans.LogConsistency
{
/// <summary>
/// Interface implemented by all grains which use log-view consistency
/// It gives the log view adaptor access to grain-specific information and callbacks.
/// </summary>
/// <typeparam name="TLogView">type of the log view</typeparam>
/// <typeparam name="TLogEntry">type of log entries</typeparam>
public interface ILogViewAdaptorHost<TLogView, TLogEntry> : IConnectionIssueListener
{
/// <summary>
/// Implementation of view transitions.
/// Any exceptions thrown will be caught and logged as a warning./>.
/// </summary>
void UpdateView(TLogView view, TLogEntry entry);
/// <summary>
/// Notifies the host grain about state changes.
/// Called by <see cref="ILogViewAdaptor{TLogView,TLogEntry}"/> whenever the tentative or confirmed state changes.
/// Implementations may vary as to whether and how much they batch change notifications.
/// Any exceptions thrown will be caught and logged as a warning./>.
/// </summary>
void OnViewChanged(bool tentative, bool confirmed);
}
}