Java Code Examples for org.agrona.MutableDirectBuffer#getStringAscii()

The following examples show how to use org.agrona.MutableDirectBuffer#getStringAscii() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ArchiveEventDissector.java    From aeron with Apache License 2.0 6 votes vote down vote up
static void dissectReplaySessionError(
    final MutableDirectBuffer buffer, final int offset, final StringBuilder builder)
{
    int absoluteOffset = offset;
    absoluteOffset += dissectLogHeader(CONTEXT, REPLAY_SESSION_ERROR, buffer, absoluteOffset, builder);

    final long sessionId = buffer.getLong(absoluteOffset, LITTLE_ENDIAN);
    absoluteOffset += SIZE_OF_LONG;

    final long recordingId = buffer.getLong(absoluteOffset, LITTLE_ENDIAN);
    absoluteOffset += SIZE_OF_LONG;

    builder.append(": sessionId=").append(sessionId);
    builder.append(", recordingId=").append(recordingId);
    builder.append(", errorMessage=");
    buffer.getStringAscii(absoluteOffset, builder);
}
 
Example 2
Source File: ClusterEventDissector.java    From aeron with Apache License 2.0 6 votes vote down vote up
static void dissectStateChange(
    final ClusterEventCode eventCode,
    final MutableDirectBuffer buffer,
    final int offset,
    final StringBuilder builder)
{
    int absoluteOffset = offset;
    absoluteOffset += dissectLogHeader(CONTEXT, eventCode, buffer, absoluteOffset, builder);

    final int memberId = buffer.getInt(absoluteOffset, LITTLE_ENDIAN);
    absoluteOffset += SIZE_OF_INT;

    builder.append(": memberId=").append(memberId);
    builder.append(", ");
    buffer.getStringAscii(absoluteOffset, builder);
}
 
Example 3
Source File: DriverEventDissector.java    From aeron with Apache License 2.0 6 votes vote down vote up
static void dissectRemoveImageCleanup(
    final MutableDirectBuffer buffer, final int offset, final StringBuilder builder)
{
    int absoluteOffset = offset;
    absoluteOffset += dissectLogHeader(CONTEXT, REMOVE_IMAGE_CLEANUP, buffer, absoluteOffset, builder);

    builder.append(": sessionId=").append(buffer.getInt(absoluteOffset, LITTLE_ENDIAN));
    absoluteOffset += SIZE_OF_INT;

    builder.append(", streamId=").append(buffer.getInt(absoluteOffset, LITTLE_ENDIAN));
    absoluteOffset += SIZE_OF_INT;

    builder.append(", id=").append(buffer.getLong(absoluteOffset, LITTLE_ENDIAN));
    absoluteOffset += SIZE_OF_LONG;

    builder.append(", uri=");
    buffer.getStringAscii(absoluteOffset, builder);
}
 
Example 4
Source File: DriverEventDissector.java    From aeron with Apache License 2.0 6 votes vote down vote up
static void dissectUntetheredSubscriptionStateChange(
    final MutableDirectBuffer buffer, final int offset, final StringBuilder builder)
{
    int absoluteOffset = offset;
    absoluteOffset += dissectLogHeader(
        CONTEXT, UNTETHERED_SUBSCRIPTION_STATE_CHANGE, buffer, absoluteOffset, builder);

    builder.append(": subscriptionId=").append(buffer.getLong(absoluteOffset, LITTLE_ENDIAN));
    absoluteOffset += SIZE_OF_LONG;

    builder.append(", streamId=").append(buffer.getInt(absoluteOffset, LITTLE_ENDIAN));
    absoluteOffset += SIZE_OF_INT;

    builder.append(", sessionId=").append(buffer.getInt(absoluteOffset, LITTLE_ENDIAN));
    absoluteOffset += SIZE_OF_INT;

    builder.append(", ");
    buffer.getStringAscii(absoluteOffset, builder);
}
 
Example 5
Source File: ArchiveEventDissector.java    From aeron with Apache License 2.0 5 votes vote down vote up
static void dissectReplicationSessionStateChange(
    final MutableDirectBuffer buffer, final int offset, final StringBuilder builder)
{
    int absoluteOffset = offset;
    absoluteOffset += dissectLogHeader(CONTEXT, REPLICATION_SESSION_STATE_CHANGE, buffer, absoluteOffset, builder);

    final long replicationId = buffer.getLong(absoluteOffset, LITTLE_ENDIAN);
    absoluteOffset += SIZE_OF_LONG;

    builder.append(": replicationId=").append(replicationId);
    builder.append(", ");
    buffer.getStringAscii(absoluteOffset, builder);
}
 
Example 6
Source File: ArchiveEventDissector.java    From aeron with Apache License 2.0 5 votes vote down vote up
static void dissectControlSessionStateChange(
    final MutableDirectBuffer buffer, final int offset, final StringBuilder builder)
{
    int absoluteOffset = offset;
    absoluteOffset += dissectLogHeader(CONTEXT, CONTROL_SESSION_STATE_CHANGE, buffer, absoluteOffset, builder);

    final long controlSessionId = buffer.getLong(absoluteOffset, LITTLE_ENDIAN);
    absoluteOffset += SIZE_OF_LONG;

    builder.append(": controlSessionId=").append(controlSessionId);
    builder.append(", ");
    buffer.getStringAscii(absoluteOffset, builder);
}
 
Example 7
Source File: DriverEventDissector.java    From aeron with Apache License 2.0 5 votes vote down vote up
static void dissectRemovePublicationCleanup(
    final MutableDirectBuffer buffer, final int offset, final StringBuilder builder)
{
    int absoluteOffset = offset;
    absoluteOffset += dissectLogHeader(CONTEXT, REMOVE_PUBLICATION_CLEANUP, buffer, absoluteOffset, builder);

    builder.append(": sessionId=").append(buffer.getInt(absoluteOffset, LITTLE_ENDIAN));
    absoluteOffset += SIZE_OF_INT;

    builder.append(", streamId=").append(buffer.getInt(absoluteOffset, LITTLE_ENDIAN));
    absoluteOffset += SIZE_OF_INT;

    builder.append(", uri=");
    buffer.getStringAscii(absoluteOffset, builder);
}
 
Example 8
Source File: DriverEventDissector.java    From aeron with Apache License 2.0 5 votes vote down vote up
static void dissectRemoveSubscriptionCleanup(
    final MutableDirectBuffer buffer, final int offset, final StringBuilder builder)
{
    int absoluteOffset = offset;
    absoluteOffset += dissectLogHeader(CONTEXT, REMOVE_SUBSCRIPTION_CLEANUP, buffer, absoluteOffset, builder);

    builder.append(": streamId=").append(buffer.getInt(absoluteOffset, LITTLE_ENDIAN));
    absoluteOffset += SIZE_OF_INT;

    builder.append(", id=").append(buffer.getLong(absoluteOffset, LITTLE_ENDIAN));
    absoluteOffset += SIZE_OF_LONG;

    builder.append(", uri=");
    buffer.getStringAscii(absoluteOffset, builder);
}