public interface Wal
Write-ahead log.
  • Method Details

    • start

      void start() throws IgniteCheckedException
      Starts the log.
      Throws:
      IgniteCheckedException - in case of a failure.
    • close

      void close(boolean onError) throws IgniteCheckedException
      Closes the log.
      Parameters:
      onError - The flag indicating whether closing was requested on error.
      Throws:
      IgniteCheckedException - in case of a failure.
    • startCheckpoint

      void startCheckpoint() throws IgniteCheckedException
      Starts a checkpoint.
      Throws:
      IgniteCheckedException - in case of a failure.
    • finishCheckpoint

      void finishCheckpoint() throws IgniteCheckedException
      Finishes a checkpoint.
      Throws:
      IgniteCheckedException - in case of a failure.
    • logImmediately

      void logImmediately(byte[] data, int offset, int length) throws IgniteCheckedException
      Logs record immediately.
      Parameters:
      data - An array containing the record data. May not be null.
      offset - The offset of the record data within the array. Must not be negative.
      length - The length of the record data. Must be greater than 0.
      Throws:
      IgniteCheckedException - in case of a failure.
    • logDeferred

      void logDeferred(byte[] data, int offset, int length) throws IgniteCheckedException
      Logs record deferredly. It is guaranteed that the record is written before the nearest checkpoint starts.
      Parameters:
      data - An array containing the record data. May not be null.
      offset - The offset of the record data within the array. Must not be negative.
      length - The length of the record data. Must be greater than 0.
      Throws:
      IgniteCheckedException - in case of a failure.
    • size

      long size() throws IgniteCheckedException
      Gets size.
      Returns:
      Size in bytes.
      Throws:
      IgniteCheckedException - in case of a failure.
    • hasEntriesBeforeLastCheckpointStart

      boolean hasEntriesBeforeLastCheckpointStart() throws IgniteCheckedException
      Checks if the log has entries that had been added before the last checkpoint started.
      Returns:
      true if the log has entries that had been added before the last checkpoint started, false otherwise.
      Throws:
      IgniteCheckedException - in case of a failure.
    • hasEntriesAfterLastCheckpointStart

      boolean hasEntriesAfterLastCheckpointStart() throws IgniteCheckedException
      Checks if the log has entries that were added after the last checkpoint had started.
      Returns:
      true if the log has entries that were added after the last checkpoint had started, false otherwise.
      Throws:
      IgniteCheckedException - in case of a failure.
    • processEntriesBeforeLastCheckpointStart

      void processEntriesBeforeLastCheckpointStart(Wal.EntryProcessor processor) throws IgniteCheckedException
      Processes the entries that had been added before the last checkpoint started.
      Parameters:
      processor - The processor. May not be null.
      Throws:
      IgniteCheckedException - in case of a failure.
    • processEntriesAfterLastCheckpointStart

      void processEntriesAfterLastCheckpointStart(Wal.EntryProcessor processor) throws IgniteCheckedException
      Processes the entries that were added after the last checkpoint had started.
      Parameters:
      processor - The processor. May not be null.
      Throws:
      IgniteCheckedException - in case of a failure.