use of org.apache.activemq.artemis.core.buffers.impl.ResetLimitWrappedActiveMQBuffer in project activemq-artemis by apache.
the class CoreMessage method internalWritableBuffer.
private void internalWritableBuffer() {
if (writableBuffer == null) {
writableBuffer = new ResetLimitWrappedActiveMQBuffer(BODY_OFFSET, buffer.duplicate(), this);
if (endOfBodyPosition > 0) {
writableBuffer.byteBuf().setIndex(BODY_OFFSET, endOfBodyPosition - BUFFER_HEADER_SPACE + BODY_OFFSET);
writableBuffer.resetReaderIndex();
}
}
}
use of org.apache.activemq.artemis.core.buffers.impl.ResetLimitWrappedActiveMQBuffer in project activemq-artemis by apache.
the class JMSMappingOutboundTransformerTest method newMessage.
private CoreMessage newMessage(byte messageType) {
CoreMessage message = new CoreMessage(0, 512);
message.setType(messageType);
((ResetLimitWrappedActiveMQBuffer) message.getBodyBuffer()).setMessage(null);
return message;
}
use of org.apache.activemq.artemis.core.buffers.impl.ResetLimitWrappedActiveMQBuffer in project activemq-artemis by apache.
the class ClientLargeMessageImpl method checkBuffer.
private void checkBuffer() throws ActiveMQException {
if (writableBuffer == null) {
long bodySize = this.largeMessageSize + BODY_OFFSET;
if (bodySize > Integer.MAX_VALUE) {
bodySize = Integer.MAX_VALUE;
}
initBuffer((int) bodySize);
writableBuffer = new ResetLimitWrappedActiveMQBuffer(BODY_OFFSET, buffer.duplicate(), this);
largeMessageController.saveBuffer(new ActiveMQOutputStream(writableBuffer));
}
}
Aggregations