Overview | Package | Class | Deprecated | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.exist.storage.journal
Interface Loggable

All Known Implementing Classes:
  AbstractLoggable, SplitPageLoggable

public interface Loggable

Interface to be implemented by all objects that can be written or read from the journalling log.

Author:
  wolf

Method Summary
`java.lang.String` | `dump()` Returns a description of the entry for debugging purposes.
`int` | `getLogSize()` Returns the size of the work load of this entry.
`byte` | `getLogType()` Returns the type id of the log entry.
`long` | `getLsn()` Returns the `Lsn` of the entry.
`long` | `getTransactionId()` Returns the transaction id of the transaction to which the logged operation belongs.
`void` | `read(java.nio.ByteBuffer in)` Read the entry.
`void` | `redo()` Redo the underlying operation.
`void` | `setLsn(long lsn)` Set the `Lsn` of the entry.
`void` | `undo()` Undo, i.e.
`void` | `write(java.nio.ByteBuffer out)` Write this entry to the specified ByteBuffer.

Method Detail

### getLogType

    public byte getLogType()

  Returns the type id of the log entry. This is the type registered with class `LogEntryTypes`. The returned id is used by `JournalReader` to find the correct Loggable instance that can handle the entry.

  Returns:
    Type id of the log entry

### getTransactionId

    public long getTransactionId()

  Returns the transaction id of the transaction to which the logged operation belongs.

  Returns:
    transaction id

### getLsn

    public long getLsn()

  Returns the `Lsn` of the entry.

  Returns:
    LSN

### setLsn

    public void setLsn(long lsn)

  Set the `Lsn` of the entry.

  Parameters:
    `lsn` -

### write

    public void write(java.nio.ByteBuffer out)

  Write this entry to the specified ByteBuffer.

  Parameters:
    `out` -

### read

    public void read(java.nio.ByteBuffer in)

  Read the entry.

  Parameters:
    `in` -

### getLogSize

    public int getLogSize()

  Returns the size of the work load of this entry.

  Returns:
    size of the work load of this entry.

### redo

    public void redo()
              throws LogException

  Redo the underlying operation. This method is called by `RecoveryManager`.

  Throws:
    `LogException`

### undo

    public void undo()
              throws LogException

  Undo, i.e. roll back, the underlying operation. The method is called by `RecoveryManager`.

  Throws:
    `LogException`

### dump

    public java.lang.String dump()

  Returns a description of the entry for debugging purposes.

  Returns:
    description

Overview | Package | Class | Deprecated | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright (C) Wolfgang Meier. All rights reserved.