org.apache.bookkeeper.proto
Interface BookieProtocol


public interface BookieProtocol

The packets of the Bookie protocol all have a 4-byte integer indicating the type of request or response at the very beginning of the packet followed by a payload.


Field Summary
static int ADDENTRY
          The Add entry request payload will be a ledger entry exactly as it should be logged.
static int EBADREQ
          The error code that indicates an invalid request type
static int EIO
          General error occurred at the server
static int ENOENTRY
          The error code that indicates that the requested entry does not exist
static int ENOLEDGER
          The error code that indicates that the ledger does not exist
static int EOK
          The error code that indicates success
static int EUA
          Unauthorized access to ledger
static int READENTRY
          The Read entry request payload will be the ledger number and entry number to read.
 

Field Detail

ADDENTRY

static final int ADDENTRY
The Add entry request payload will be a ledger entry exactly as it should be logged. The response payload will be a 4-byte integer that has the error code followed by the 8-byte ledger number and 8-byte entry number of the entry written.

See Also:
Constant Field Values

READENTRY

static final int READENTRY
The Read entry request payload will be the ledger number and entry number to read. (The ledger number is an 8-byte integer and the entry number is a 8-byte integer.) The response payload will be a 4-byte integer representing an error code and a ledger entry if the error code is EOK, otherwise it will be the 8-byte ledger number and the 4-byte entry number requested. (Note that the first sixteen bytes of the entry happen to be the ledger number and entry number as well.)

See Also:
Constant Field Values

EOK

static final int EOK
The error code that indicates success

See Also:
Constant Field Values

ENOLEDGER

static final int ENOLEDGER
The error code that indicates that the ledger does not exist

See Also:
Constant Field Values

ENOENTRY

static final int ENOENTRY
The error code that indicates that the requested entry does not exist

See Also:
Constant Field Values

EBADREQ

static final int EBADREQ
The error code that indicates an invalid request type

See Also:
Constant Field Values

EIO

static final int EIO
General error occurred at the server

See Also:
Constant Field Values

EUA

static final int EUA
Unauthorized access to ledger

See Also:
Constant Field Values