/** * The channel status counter id. * * @return channel status counter id. */ public int channelStatusCounterId() { return buffer.getInt(offset + CHANNEL_STATUS_INDICATOR_ID_OFFSET); }
/** * return stream id field * * @return stream id field */ public int streamId() { return buffer.getInt(offset + STREAM_ID_FIELD_OFFSET); }
/** * Return the position Id for the subscriber * * @return position Id for the subscriber */ public int subscriberPositionId() { return buffer.getInt(offset + SUBSCRIBER_POSITION_ID_OFFSET); }
/** * return type id field * * @return type id field */ public int typeId() { return buffer.getInt(offset + COUNTER_TYPE_ID_FIELD_OFFSET); }
/** * The channel status counter id. * * @return channel status counter id. */ public int channelStatusCounterId() { return buffer.getInt(offset + CHANNEL_STATUS_INDICATOR_ID_OFFSET); }
/** * Get the session id field * * @return session id field */ public int sessionId() { return buffer.getInt(offset + SESSION_ID_OFFSET); }
/** * Get the length of the current message * <p> * NB: must be called after the data is written in order to be accurate. * * @return the length of the current message */ public int length() { return buffer.getInt(offset + LOGFILE_FIELD_OFFSET) + LOGFILE_FIELD_OFFSET + SIZE_OF_INT; } }
/** * Length of the error response in bytes. * * @return length of the error response */ public int length() { return buffer.getInt(offset + ERROR_MESSAGE_OFFSET) + ERROR_MESSAGE_OFFSET + BitUtil.SIZE_OF_INT; } }
/** * return the stream id * * @return the stream id */ public int streamId() { return buffer.getInt(offset + STREAM_ID_OFFSET); }
/** * Get the stream id field * * @return stream id field */ public int streamId() { return buffer.getInt(offset + STREAM_ID_FIELD_OFFSET); }
/** * return session id field * * @return session id field */ public int sessionId() { return buffer.getInt(offset + SESSION_ID_OFFSET); }
/** * The counter id. * * @return counter id. */ public int counterId() { return buffer.getInt(offset + COUNTER_ID_OFFSET); }
/** * Length of the key buffer in bytes * * @return length of key buffer in bytes */ public int keyBufferLength() { return buffer.getInt(offset + KEY_LENGTH_OFFSET); }
/** * return stream id field * * @return stream id field */ public int streamId() { return buffer.getInt(offset + STREAM_ID_FIELD_OFFSET); }
private int sourceIdentityOffset() { final int alignedLength = BitUtil.align(buffer.getInt(offset + LOG_FILE_NAME_OFFSET), SIZE_OF_INT); return LOG_FILE_NAME_OFFSET + SIZE_OF_INT + alignedLength; } }
/** * Get the length of the current message * <p> * NB: must be called after the data is written in order to be accurate. * * @return the length of the current message */ public int length() { final int labelOffset = labelOffset(); return labelOffset + buffer.getInt(offset + labelOffset) + SIZE_OF_INT; }
/** * Length of label buffer in bytes. * * @return length of label buffer in bytes */ public int labelBufferLength() { return buffer.getInt(offset + labelOffset()); }
private int labelOffset() { return KEY_LENGTH_OFFSET + SIZE_OF_INT + BitUtil.align(buffer.getInt(offset + KEY_LENGTH_OFFSET), SIZE_OF_INT); } }
/** * Error code for the command. * * @return error code for the command */ public ErrorCode errorCode() { return ErrorCode.get(buffer.getInt(offset + ERROR_CODE_OFFSET)); }
/** * Get the length of the current message * <p> * NB: must be called after the data is written in order to be accurate. * * @return the length of the current message */ public int length() { final int sourceIdentityOffset = sourceIdentityOffset(); return sourceIdentityOffset + buffer.getInt(offset + sourceIdentityOffset) + SIZE_OF_INT; }