Skip to content

Commit b8f8e2b

Browse files
authored
Create leading edge buffer where tag is not part of the key (#180)
* Add new leading edge buffer that does not treat tags as part of the key * Regen docs
1 parent a19b6a8 commit b8f8e2b

File tree

45 files changed

+1120
-104
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+1120
-104
lines changed
Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,29 @@
11
#### [QuixStreams.Streaming](index.md 'index')
22
### [QuixStreams.Streaming](QuixStreams.Streaming.md 'QuixStreams.Streaming').[App](App.md 'QuixStreams.Streaming.App')
33

4-
## App.Run(CancellationToken, Action) Method
4+
## App.Run(CancellationToken, Action, bool) Method
55

6-
Helper method to handle default streaming behaviors and handle automatic resource cleanup on shutdown
7-
It also ensures topic consumers defined at the time of invocation are subscribed to receive messages.
6+
Helper method to handle default streaming behaviors and handle automatic resource cleanup on shutdown
87

98
```csharp
10-
public static void Run(System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken), System.Action beforeShutdown=null);
9+
public static void Run(System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken), System.Action beforeShutdown=null, bool subscribe=true);
1110
```
1211
#### Parameters
1312

14-
<a name='QuixStreams.Streaming.App.Run(System.Threading.CancellationToken,System.Action).cancellationToken'></a>
13+
<a name='QuixStreams.Streaming.App.Run(System.Threading.CancellationToken,System.Action,bool).cancellationToken'></a>
1514

1615
`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken')
1716

1817
The cancellation token to abort. Use when you wish to manually stop streaming for other reason that shutdown.
1918

20-
<a name='QuixStreams.Streaming.App.Run(System.Threading.CancellationToken,System.Action).beforeShutdown'></a>
19+
<a name='QuixStreams.Streaming.App.Run(System.Threading.CancellationToken,System.Action,bool).beforeShutdown'></a>
2120

2221
`beforeShutdown` [System.Action](https://docs.microsoft.com/en-us/dotnet/api/System.Action 'System.Action')
2322

24-
The callback to invoke before shutting down
23+
The callback to invoke before shutting down
24+
25+
<a name='QuixStreams.Streaming.App.Run(System.Threading.CancellationToken,System.Action,bool).subscribe'></a>
26+
27+
`subscribe` [System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean')
28+
29+
Whether the consumer defined should be automatically subscribed to start receiving messages

docs/api-reference/csharp/App.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@ Inheritance [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.O
1414
| Methods | |
1515
| :--- | :--- |
1616
| [GetStateManager()](App.GetStateManager().md 'QuixStreams.Streaming.App.GetStateManager()') | Retrieves the state manager for the application |
17-
| [Run(CancellationToken, Action)](App.Run(CancellationToken,Action).md 'QuixStreams.Streaming.App.Run(System.Threading.CancellationToken, System.Action)') | Helper method to handle default streaming behaviors and handle automatic resource cleanup on shutdown<br/>It also ensures topic consumers defined at the time of invocation are subscribed to receive messages. |
17+
| [Run(CancellationToken, Action, bool)](App.Run(CancellationToken,Action,bool).md 'QuixStreams.Streaming.App.Run(System.Threading.CancellationToken, System.Action, bool)') | Helper method to handle default streaming behaviors and handle automatic resource cleanup on shutdown |
1818
| [SetStateStorage(IStateStorage)](App.SetStateStorage(IStateStorage).md 'QuixStreams.Streaming.App.SetStateStorage(QuixStreams.State.Storage.IStateStorage)') | Sets the state storage for the app |

docs/api-reference/csharp/IRawTopicConsumer.Subscribe().md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
## IRawTopicConsumer.Subscribe() Method
55

6-
Start reading streams.
6+
Start reading data from the topic.
77
Use 'OnMessageReceived' event to read messages after executing this method
88

99
```csharp
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#### [QuixStreams.Streaming](index.md 'index')
2+
### [QuixStreams.Streaming.Raw](QuixStreams.Streaming.Raw.md 'QuixStreams.Streaming.Raw').[IRawTopicConsumer](IRawTopicConsumer.md 'QuixStreams.Streaming.Raw.IRawTopicConsumer')
3+
4+
## IRawTopicConsumer.Unsubscribe() Method
5+
6+
Stops reading data from the topic.
7+
8+
```csharp
9+
void Unsubscribe();
10+
```

docs/api-reference/csharp/IRawTopicConsumer.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ Implements [System.IDisposable](https://docs.microsoft.com/en-us/dotnet/api/Syst
1717
1818
| Methods | |
1919
| :--- | :--- |
20-
| [Subscribe()](IRawTopicConsumer.Subscribe().md 'QuixStreams.Streaming.Raw.IRawTopicConsumer.Subscribe()') | Start reading streams.<br/>Use 'OnMessageReceived' event to read messages after executing this method |
20+
| [Subscribe()](IRawTopicConsumer.Subscribe().md 'QuixStreams.Streaming.Raw.IRawTopicConsumer.Subscribe()') | Start reading data from the topic.<br/>Use 'OnMessageReceived' event to read messages after executing this method |
21+
| [Unsubscribe()](IRawTopicConsumer.Unsubscribe().md 'QuixStreams.Streaming.Raw.IRawTopicConsumer.Unsubscribe()') | Stops reading data from the topic. |
2122

2223
| Events | |
2324
| :--- | :--- |
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#### [QuixStreams.Streaming](index.md 'index')
2+
### [QuixStreams.Streaming](QuixStreams.Streaming.md 'QuixStreams.Streaming').[ITopicConsumer](ITopicConsumer.md 'QuixStreams.Streaming.ITopicConsumer')
3+
4+
## ITopicConsumer.Unsubscribe() Method
5+
6+
Stops subscribing to streams.
7+
8+
```csharp
9+
void Unsubscribe();
10+
```

docs/api-reference/csharp/ITopicConsumer.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ Implements [System.IDisposable](https://docs.microsoft.com/en-us/dotnet/api/Syst
2020
| [Commit()](ITopicConsumer.Commit().md 'QuixStreams.Streaming.ITopicConsumer.Commit()') | Commit packages read up until now |
2121
| [GetStateManager()](ITopicConsumer.GetStateManager().md 'QuixStreams.Streaming.ITopicConsumer.GetStateManager()') | Gets the manager for the topic states |
2222
| [Subscribe()](ITopicConsumer.Subscribe().md 'QuixStreams.Streaming.ITopicConsumer.Subscribe()') | Start subscribing to streams.<br/>Use 'OnStreamReceived' event to read stream after executing this method |
23+
| [Unsubscribe()](ITopicConsumer.Unsubscribe().md 'QuixStreams.Streaming.ITopicConsumer.Unsubscribe()') | Stops subscribing to streams. |
2324

2425
| Events | |
2526
| :--- | :--- |

docs/api-reference/csharp/LeadingEdgeBuffer.GetOrCreateTimestamp(long,Dictionary_string,string_).md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
Gets an already buffered row based on timestamp and tags that can be modified or creates a new one if it doesn't exist.
77

88
```csharp
9-
public QuixStreams.Streaming.Models.LeadingEdgeTimestamp GetOrCreateTimestamp(long timestampInNanoseconds, System.Collections.Generic.Dictionary<string,string> tags=null);
9+
public QuixStreams.Streaming.Models.LeadingEdgeRow GetOrCreateTimestamp(long timestampInNanoseconds, System.Collections.Generic.Dictionary<string,string> tags=null);
1010
```
1111
#### Parameters
1212

@@ -23,4 +23,4 @@ Timestamp in nanoseconds
2323
Optional Tags
2424

2525
#### Returns
26-
[LeadingEdgeTimestamp](LeadingEdgeTimestamp.md 'QuixStreams.Streaming.Models.LeadingEdgeTimestamp')
26+
[LeadingEdgeRow](LeadingEdgeRow.md 'QuixStreams.Streaming.Models.LeadingEdgeRow')

docs/api-reference/csharp/LeadingEdgeBuffer.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33

44
## LeadingEdgeBuffer Class
55

6+
Leading edge buffer where time and tag are treated as a compound key
7+
68
```csharp
79
public class LeadingEdgeBuffer
810
```
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,33 @@
11
#### [QuixStreams.Streaming](index.md 'index')
2-
### [QuixStreams.Streaming.Models](QuixStreams.Streaming.Models.md 'QuixStreams.Streaming.Models').[LeadingEdgeTimestamp](LeadingEdgeTimestamp.md 'QuixStreams.Streaming.Models.LeadingEdgeTimestamp')
2+
### [QuixStreams.Streaming.Models](QuixStreams.Streaming.Models.md 'QuixStreams.Streaming.Models').[LeadingEdgeRow](LeadingEdgeRow.md 'QuixStreams.Streaming.Models.LeadingEdgeRow')
33

4-
## LeadingEdgeTimestamp.AddValue(string, byte[], bool) Method
4+
## LeadingEdgeRow.AddValue(string, byte[], bool) Method
55

66
Adds a value to the row
77

88
```csharp
9-
public QuixStreams.Streaming.Models.LeadingEdgeTimestamp AddValue(string parameter, byte[] value, bool overwrite=false);
9+
public QuixStreams.Streaming.Models.LeadingEdgeRow AddValue(string parameter, byte[] value, bool overwrite=false);
1010
```
1111
#### Parameters
1212

13-
<a name='QuixStreams.Streaming.Models.LeadingEdgeTimestamp.AddValue(string,byte[],bool).parameter'></a>
13+
<a name='QuixStreams.Streaming.Models.LeadingEdgeRow.AddValue(string,byte[],bool).parameter'></a>
1414

1515
`parameter` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String')
1616

1717
Parameter name
1818

19-
<a name='QuixStreams.Streaming.Models.LeadingEdgeTimestamp.AddValue(string,byte[],bool).value'></a>
19+
<a name='QuixStreams.Streaming.Models.LeadingEdgeRow.AddValue(string,byte[],bool).value'></a>
2020

2121
`value` [System.Byte](https://docs.microsoft.com/en-us/dotnet/api/System.Byte 'System.Byte')[[]](https://docs.microsoft.com/en-us/dotnet/api/System.Array 'System.Array')
2222

2323
Value of the parameter
2424

25-
<a name='QuixStreams.Streaming.Models.LeadingEdgeTimestamp.AddValue(string,byte[],bool).overwrite'></a>
25+
<a name='QuixStreams.Streaming.Models.LeadingEdgeRow.AddValue(string,byte[],bool).overwrite'></a>
2626

2727
`overwrite` [System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean')
2828

2929
If set to true, it will overwrite an existing value for the specified parameter if one already exists.
3030
If set to false and a value for the specified parameter already exists, the method ignore the new value and just return the current LeadingEdgeTimestamp instance.
3131

3232
#### Returns
33-
[LeadingEdgeTimestamp](LeadingEdgeTimestamp.md 'QuixStreams.Streaming.Models.LeadingEdgeTimestamp')
33+
[LeadingEdgeRow](LeadingEdgeRow.md 'QuixStreams.Streaming.Models.LeadingEdgeRow')

0 commit comments

Comments
 (0)