org.apache.s4.core.ft
Class NoOpCheckpointingFramework

java.lang.Object
  extended by org.apache.s4.core.ft.NoOpCheckpointingFramework
All Implemented Interfaces:
CheckpointingFramework

public final class NoOpCheckpointingFramework
extends java.lang.Object
implements CheckpointingFramework

Implementation of CheckpointingFramework that does NO checkpointing.


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.apache.s4.core.ft.CheckpointingFramework
CheckpointingFramework.StorageResultCode
 
Constructor Summary
NoOpCheckpointingFramework()
           
 
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NoOpCheckpointingFramework

public NoOpCheckpointingFramework()
Method Detail

saveState

public StorageCallback saveState(ProcessingElement pe)
Description copied from interface: CheckpointingFramework
Serializes and stores state to the storage backend. Serialization and storage operations are asynchronous.

Specified by:
saveState in interface CheckpointingFramework
Returns:
a callback for getting notified of the result of the storage operation

fetchSerializedState

public byte[] fetchSerializedState(CheckpointId key)
Description copied from interface: CheckpointingFramework
Fetches checkpoint data from storage for a given PE

Specified by:
fetchSerializedState in interface CheckpointingFramework
Parameters:
key - safeKeeperId
Returns:
checkpoint data

isCheckpointable

public boolean isCheckpointable(ProcessingElement pe)
Description copied from interface: CheckpointingFramework
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.

Specified by:
isCheckpointable in interface CheckpointingFramework
Parameters:
pe - processing element to evaluate
Returns:
true if checkpointable, according to the above requirements