org.apache.s4.core.ft
Interface CheckpointingFramework

All Known Implementing Classes:
NoOpCheckpointingFramework, SafeKeeper

public interface CheckpointingFramework

This interface defines the functionalities offered by the checkpointing framework.


Nested Class Summary
static class CheckpointingFramework.StorageResultCode
           
 
Method Summary
 byte[] fetchSerializedState(CheckpointId key)
          Fetches checkpoint data from storage for a given PE
 boolean isCheckpointable(ProcessingElement pe)
          Evaluates whether specified PE should be checkpointed, based on: whether checkpointing enabled whether the pe is "dirty" the checkpointing frequency settings This is used for count-based checkpointing intervals.
 StorageCallback saveState(ProcessingElement pe)
          Serializes and stores state to the storage backend.
 

Method Detail

saveState

StorageCallback saveState(ProcessingElement pe)
Serializes and stores state to the storage backend. Serialization and storage operations are asynchronous.

Returns:
a callback for getting notified of the result of the storage operation

fetchSerializedState

byte[] fetchSerializedState(CheckpointId key)
Fetches checkpoint data from storage for a given PE

Parameters:
key - safeKeeperId
Returns:
checkpoint data

isCheckpointable

boolean isCheckpointable(ProcessingElement pe)
Evaluates whether specified PE should be checkpointed, based on: This is used for count-based checkpointing intervals. Time-based checkpointing relies on the dirty flag when triggered.

Parameters:
pe - processing element to evaluate
Returns:
true if checkpointable, according to the above requirements