use of org.apache.ignite.internal.direct.stream.DirectByteBufferStream in project ignite by apache.
the class DirectMessageReader method readObjectArray.
/**
* {@inheritDoc}
*/
@Override
public <T> T[] readObjectArray(String name, MessageCollectionItemType itemType, Class<T> itemCls) {
DirectByteBufferStream stream = state.item().stream;
T[] msg = stream.readObjectArray(itemType, itemCls, this);
lastRead = stream.lastFinished();
return msg;
}
use of org.apache.ignite.internal.direct.stream.DirectByteBufferStream in project ignite by apache.
the class DirectMessageReader method readMessage.
/**
* {@inheritDoc}
*/
@Nullable
@Override
public <T extends Message> T readMessage(String name) {
DirectByteBufferStream stream = state.item().stream;
T msg = stream.readMessage(this);
lastRead = stream.lastFinished();
return msg;
}
use of org.apache.ignite.internal.direct.stream.DirectByteBufferStream in project ignite by apache.
the class DirectMessageReader method readUuid.
/**
* {@inheritDoc}
*/
@Override
public UUID readUuid(String name) {
DirectByteBufferStream stream = state.item().stream;
UUID val = stream.readUuid();
lastRead = stream.lastFinished();
return val;
}
use of org.apache.ignite.internal.direct.stream.DirectByteBufferStream in project ignite by apache.
the class DirectMessageWriter method writeHeader.
/**
* {@inheritDoc}
*/
@Override
public boolean writeHeader(short type, byte fieldCnt) {
DirectByteBufferStream stream = state.item().stream;
stream.writeShort(type);
return stream.lastFinished();
}
use of org.apache.ignite.internal.direct.stream.DirectByteBufferStream in project ignite by apache.
the class DirectMessageWriter method writeCharArray.
/**
* {@inheritDoc}
*/
@Override
public boolean writeCharArray(String name, @Nullable char[] val) {
DirectByteBufferStream stream = state.item().stream;
stream.writeCharArray(val);
return stream.lastFinished();
}
Aggregations