Example usage for io.netty.buffer ByteBuf readerIndex

List of usage examples for io.netty.buffer ByteBuf readerIndex

Introduction

In this page you can find the example usage for io.netty.buffer ByteBuf readerIndex.

Prototype

public abstract int readerIndex();

Source Link

Document

Returns the readerIndex of this buffer.

Usage

From source file:org.apache.bookkeeper.bookie.SortedLedgerStorage.java

License:Apache License

@Override
public long addEntry(ByteBuf entry) throws IOException {
    long ledgerId = entry.getLong(entry.readerIndex() + 0);
    long entryId = entry.getLong(entry.readerIndex() + 8);
    long lac = entry.getLong(entry.readerIndex() + 16);

    memTable.addEntry(ledgerId, entryId, entry.nioBuffer(), this);
    interleavedLedgerStorage.ledgerCache.updateLastAddConfirmed(ledgerId, lac);
    return entryId;
}