|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IRogChangeDataCaptureHandler
Defines the interface for a change data capture handler.
The platform delivers CDC updates based on IStorePersister
checkpoints. The
IStoreBinding
periodically demarcates checkpoints in its stream of PUT, UPDATE
and REMOVE operations. Objects that are mutated after such a checkpoint demarcation are
tagged with a checkpoint version indicating the checkpoint in which they were last modified.
Checkpoints in a log are used to perform change data capture. The CDC Processor walks the log and dispatches change events for each stable checkpoint in the log. A stable checkpoint is defined as a checkpoint that is complete and all transactions in the checkpoint have been stabililized. The CDC processor records change events successfully processed by the CDC handler and does not dispatch already processed entries upon restart of the CDC process.
Nested Class Summary | |
---|---|
static class |
IRogChangeDataCaptureHandler.ChangeType
Enumerates the various types of change for an object that can be reported by the CDC processor |
static class |
IRogChangeDataCaptureHandler.LogCompletionReason
Enumerates the set of reasons why CDC run on a log completed |
Method Summary | |
---|---|
boolean |
handleChange(com.eaio.uuid.UUID objectId,
IRogChangeDataCaptureHandler.ChangeType changeType,
List<IRogNode> entries)
Called to notify of a change. |
boolean |
onCheckpointComplete(long checkpointVersion)
Dispatched when the processing of a checkpoint has completed started |
void |
onCheckpointStart(long checkpointVersion)
Dispatched when the processing of a new checkpoint is started |
void |
onLogComplete(int logNumber,
IRogChangeDataCaptureHandler.LogCompletionReason reason,
Throwable errorCause)
Dispatched when the CDC has reached the end of the current log. |
void |
onLogStart(int logNumber)
Dispatched when the processing of a new log is started |
void |
onWait()
Dispatched when waiting for more entries to enter the log being CDC'd This event is dispatched once each time the reader reaches the end of the log being CDC'd and it waits for a new entry to be added to the log. |
Method Detail |
---|
void onLogStart(int logNumber)
logNumber
- The log numbervoid onCheckpointStart(long checkpointVersion)
checkpointVersion
- The checkpoint numberboolean handleChange(com.eaio.uuid.UUID objectId, IRogChangeDataCaptureHandler.ChangeType changeType, List<IRogNode> entries)
objectId
- The id of the object.changeType
- The change being reportedentries
- The set of entries that list the operations performed on
the object within the checkpoint being processed.
boolean onCheckpointComplete(long checkpointVersion)
checkpointVersion
- The checkpoint number
void onWait()
This event is dispatched once each time the reader reaches the end of the log being CDC'd and it waits for a new entry to be added to the log. This event is dispatched maximum of once per checkpoint in the log.
void onLogComplete(int logNumber, IRogChangeDataCaptureHandler.LogCompletionReason reason, Throwable errorCause)
logNumber
- The log number whose CDC is completereason
- The reason for completionerrorCause
- The exception that was encountered that caused the
log CDC to complete. This is non-null if and only if the reason
is IRogChangeDataCaptureHandler.LogCompletionReason.Error
This event is dispatched when the CDC of a log is complete and CDC is moving onto the next log.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |