public interface

WriteAheadLog

com.netflix.astyanax.WriteAheadLog
Known Indirect Subclasses

Class Overview

Base interface for a write ahead log. The purpose of the WAL is to provide atomicity and durability when writing to Cassandra. Before writing to cassandra a record is written to the WAL which is assumed to stable storage able to survive from a crash or hardware failure. After a crash the system will inspect the WAL for records and replay them. If a record is successfully written to cassandra it will be removed from the WAL.

Summary

Public Methods
abstract WriteAheadEntry createEntry()
Add an entry to WAL before it is sent to Cassandra.
abstract WriteAheadEntry readNextEntry()
Read the next entry to retry from the wall.
abstract void removeEntry(WriteAheadEntry entry)
Remove an entry from the WAL after it was successfully written to cassandra
abstract void retryEntry(WriteAheadEntry entry)
Retry an entry retrieved by calling getNextEntry();

Public Methods

public abstract WriteAheadEntry createEntry ()

Add an entry to WAL before it is sent to Cassandra.

Throws
WalException

public abstract WriteAheadEntry readNextEntry ()

Read the next entry to retry from the wall. Call remove if successful or retryEntry if unable to write to cassandra.

public abstract void removeEntry (WriteAheadEntry entry)

Remove an entry from the WAL after it was successfully written to cassandra

public abstract void retryEntry (WriteAheadEntry entry)

Retry an entry retrieved by calling getNextEntry();