Repository navigation
Expand file tree
/
Copy pathSystemNames.cs
More file actions
150 lines (123 loc) · 4.39 KB
/
Copy pathSystemNames.cs
File metadata and controls
150 lines (123 loc) · 4.39 KB
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
namespace EventStore.ClientAPI.Common
{
static class SystemStreams
{
public const string StreamsStream = "$streams";
public const string SettingsStream = "$settings";
public const string StatsStreamPrefix = "$stats";
public static string MetastreamOf(string streamId)
{
return "$$" + streamId;
}
public static bool IsMetastream(string streamId)
{
return streamId.StartsWith("$$");
}
public static string OriginalStreamOf(string metastreamId)
{
return metastreamId.Substring(2);
}
}
///<summary>
///Constants for information in stream metadata
///</summary>
public static class SystemMetadata
{
///<summary>
///The definition of the MaxAge value assigned to stream metadata
///Setting this allows all events older than the limit to be deleted
///</summary>
public const string MaxAge = "$maxAge";
///<summary>
///The definition of the MaxCount value assigned to stream metadata
///setting this allows all events with a sequence less than current -maxcount to be deleted
///</summary>
public const string MaxCount = "$maxCount";
///<summary>
///The definition of the Truncate Before value assigned to stream metadata
///setting this allows all events prior to the integer value to be deleted
///</summary>
public const string TruncateBefore = "$tb";
///<summary>
/// Sets the cache control in seconds for the head of the stream.
///</summary>
public const string CacheControl = "$cacheControl";
///<summary>
/// The acl definition in metadata
///</summary>
public const string Acl = "$acl";
///<summary>
/// to read from a stream
///</summary>
public const string AclRead = "$r";
///<summary>
/// to write to a stream
///</summary>
public const string AclWrite = "$w";
///<summary>
/// to delete a stream
///</summary>
public const string AclDelete = "$d";
///<summary>
/// to read metadata
///</summary>
public const string AclMetaRead = "$mr";
///<summary>
/// to write metadata
///</summary>
public const string AclMetaWrite = "$mw";
///<summary>
/// The user default acl stream
///</summary>
public const string UserStreamAcl = "$userStreamAcl";
///<summary>
/// the system stream defaults acl stream
///</summary>
public const string SystemStreamAcl = "$systemStreamAcl";
}
///<summary>
///Constants for System event types
///</summary>
public static class SystemEventTypes
{
///<summary>
/// event type for stream deleted
///</summary>
public const string StreamDeleted = "$streamDeleted";
///<summary>
/// event type for statistics
///</summary>
public const string StatsCollection = "$statsCollected";
///<summary>
/// event type for linkTo
///</summary>
public const string LinkTo = "$>";
///<summary>
/// event type for stream metadata
///</summary>
public const string StreamMetadata = "$metadata";
///<summary>
/// event type for the system settings
///</summary>
public const string Settings = "$settings";
}
/// <summary>
/// System supported consumer strategies for use with persistent subscriptions.
/// </summary>
public static class SystemConsumerStrategies
{
/// <summary>
/// Distributes events to a single client until it is full. Then round robin to the next client.
/// </summary>
public const string DispatchToSingle = "DispatchToSingle";
/// <summary>
/// Distribute events to each client in a round robin fashion.
/// </summary>
public const string RoundRobin = "RoundRobin";
/// <summary>
/// Distribute events of the same streamId to the same client until it disconnects on a best efforts basis.
/// Designed to be used with indexes such as the category projection.
/// </summary>
public const string Pinned = "Pinned";
}
}