/** * Set the correlation id field * * @param correlationId field value * @return flyweight */ public PublicationBuffersReadyFlyweight correlationId(final long correlationId) { buffer.putLong(offset + CORRELATION_ID_OFFSET, correlationId); return this; }
/** * Set the stream id field * * @param streamId field value * @return flyweight */ public PublicationBuffersReadyFlyweight streamId(final int streamId) { buffer.putInt(offset + STREAM_ID_FIELD_OFFSET, streamId); return this; }
/** * Get the session id field * * @return session id field */ public int sessionId() { return buffer.getInt(offset + SESSION_ID_OFFSET); }
/** * Get the correlation id field * * @return correlation id field */ public long correlationId() { return buffer.getLong(offset + CORRELATION_ID_OFFSET); }
/** * Set channel field in ASCII * * @param channel field value * @return flyweight */ public DestinationMessageFlyweight channel(final String channel) { lengthOfChannel = buffer.putStringAscii(offset + CHANNEL_OFFSET, channel); return this; }
/** * Get the channel field in ASCII * * @return channel field */ public String channel() { return buffer.getStringAscii(offset + CHANNEL_OFFSET); }
/** * set counter type id field * * @param typeId field value * @return flyweight */ public CounterMessageFlyweight typeId(final long typeId) { buffer.putLong(offset + COUNTER_TYPE_ID_FIELD_OFFSET, typeId); return this; }
/** * Set the stream id field * * @param streamId field value * @return flyweight */ public PublicationMessageFlyweight streamId(final int streamId) { buffer.putInt(offset + STREAM_ID_FIELD_OFFSET, streamId); return this; }
/** * 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; } }
/** * Registration ID for the subscription. * * @return registration ID for the subscription. */ public long subscriptionRegistrationId() { return buffer.getLong(offset + SUBSCRIPTION_REGISTRATION_ID_OFFSET); }
/** * set client id field * * @param clientId field value * @return for fluent API */ public ClientTimeoutFlyweight clientId(final long clientId) { buffer.putLong(offset + CLIENT_ID_FIELD_OFFSET, clientId); return this; } }
/** * 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; } }
/** * Get the registration id field * * @return registration id field */ public long registrationId() { return buffer.getLong(offset + REGISTRATION_ID_OFFSET); }
/** * Get the stream id field * * @return stream id field */ public int streamId() { return buffer.getInt(offset + STREAM_ID_FIELD_OFFSET); }
/** * return correlation id field * * @return correlation id field */ public long correlationId() { return buffer.getLong(offset + CORRELATION_ID_FIELD_OFFSET); }
/** * return session id field * * @return session id field */ public int sessionId() { return buffer.getInt(offset + SESSION_ID_OFFSET); }