-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
47 changed files
with
919 additions
and
449 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#### Port | ||
Aeron.NET has been ported against Java version: | ||
- Agrona: 0.9.12-30-gec52107 | ||
- Aeron: 1.8.2-196-gd0e9417c2 | ||
- Aeron: 1.8.2-257-g9abef0124 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,2 @@ | ||
Driver built from source | ||
Agrona: 0.9.15-35-g9e6c532 | ||
SBE: 1.7.9-33-gc3884639 | ||
Aeron: 1.8.2-196-gd0e9417c2 | ||
Driver source: | ||
http://repo1.maven.org/maven2/io/aeron/aeron-all/1.9.0/aeron-all-1.9.0.jar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
using Adaptive.Agrona; | ||
using Adaptive.Agrona.Concurrent.Status; | ||
|
||
namespace Adaptive.Aeron.Status | ||
{ | ||
/// <summary> | ||
/// Allocate a counter for tracking the last heartbeat of an entity. | ||
/// </summary> | ||
public class HeartbeatStatus | ||
{ | ||
/// <summary> | ||
/// Offset in the key meta data for the registration id of the counter. | ||
/// </summary> | ||
public const int REGISTRATION_ID_OFFSET = 0; | ||
|
||
/// <summary> | ||
/// Allocate a counter for tracking the last heartbeat of an entity. | ||
/// </summary> | ||
/// <param name="tempBuffer"> to be used for labels and key. </param> | ||
/// <param name="name"> of the counter for the label. </param> | ||
/// <param name="typeId"> of the counter for classification. </param> | ||
/// <param name="countersManager"> from which to allocated the underlying storage. </param> | ||
/// <param name="registrationId"> to be associated with the counter. </param> | ||
/// <returns> a new <seealso cref="AtomicCounter"/> for tracking the last heartbeat. </returns> | ||
public static AtomicCounter Allocate( | ||
IMutableDirectBuffer tempBuffer, | ||
string name, | ||
int typeId, | ||
CountersManager countersManager, | ||
long registrationId) | ||
{ | ||
return new AtomicCounter(countersManager.ValuesBuffer, | ||
AllocateCounterId(tempBuffer, name, typeId, countersManager, registrationId), countersManager); | ||
} | ||
|
||
public static int AllocateCounterId( | ||
IMutableDirectBuffer tempBuffer, | ||
string name, | ||
int typeId, | ||
CountersManager countersManager, | ||
long registrationId) | ||
{ | ||
tempBuffer.PutLong(REGISTRATION_ID_OFFSET, registrationId); | ||
int keyLength = REGISTRATION_ID_OFFSET + BitUtil.SIZE_OF_LONG; | ||
|
||
int labelLength = 0; | ||
labelLength += tempBuffer.PutStringWithoutLengthAscii(keyLength + labelLength, name); | ||
labelLength += tempBuffer.PutStringWithoutLengthAscii(keyLength + labelLength, ": "); | ||
labelLength += tempBuffer.PutLongAscii(keyLength + labelLength, registrationId); | ||
|
||
return countersManager.Allocate(typeId, tempBuffer, 0, keyLength, tempBuffer, keyLength, labelLength); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.