Search in sources :

Example 36 with DirectByteBufferStream

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;
}
Also used : DirectByteBufferStream(org.apache.ignite.internal.direct.stream.DirectByteBufferStream)

Example 37 with DirectByteBufferStream

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;
}
Also used : DirectByteBufferStream(org.apache.ignite.internal.direct.stream.DirectByteBufferStream) Nullable(org.jetbrains.annotations.Nullable)

Example 38 with DirectByteBufferStream

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;
}
Also used : DirectByteBufferStream(org.apache.ignite.internal.direct.stream.DirectByteBufferStream) UUID(java.util.UUID)

Example 39 with DirectByteBufferStream

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();
}
Also used : DirectByteBufferStream(org.apache.ignite.internal.direct.stream.DirectByteBufferStream)

Example 40 with DirectByteBufferStream

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();
}
Also used : DirectByteBufferStream(org.apache.ignite.internal.direct.stream.DirectByteBufferStream)

Aggregations

DirectByteBufferStream (org.apache.ignite.internal.direct.stream.DirectByteBufferStream)51 Nullable (org.jetbrains.annotations.Nullable)9 BitSet (java.util.BitSet)1 UUID (java.util.UUID)1 IgniteUuid (org.apache.ignite.lang.IgniteUuid)1