public interface DatabaseChangeListener
| Modifier and Type | Method and Description |
|---|---|
default void |
onCollectionCreated(CollectionCreated collectionCreated)
Called when a collection is created.
|
default void |
onCollectionDropped(CollectionDropped collectionDropped)
Called when a collection is dropped.
|
default void |
onCollectionFlushed(CollectionFlushed collectionFlushed)
Called when a collection is flushed.
|
default void |
onDeletion(Deletion deletion)
Called when a Couchbase document is deleted or expired.
|
default void |
onFailoverLog(FailoverLog failoverLog) |
void |
onFailure(StreamFailure streamFailure)
Something bad and probably unrecoverable happened.
|
default void |
onMutation(Mutation mutation)
Called when a Couchbase document is created or updated.
|
default void |
onRollback(Rollback rollback) |
default void |
onScopeCreated(ScopeCreated scopeCreated)
Called when a new scope is created.
|
default void |
onScopeDropped(ScopeDropped scopeDropped)
Called when a scope is dropped.
|
default void |
onSeqnoAdvanced(SeqnoAdvanced seqnoAdvanced)
Called when a vbucket sequence number has advanced due to an event other than
a document change, or for events the consumer is not subscribed to.
|
default void |
onSnapshot(SnapshotDetails snapshotDetails) |
default void |
onStreamEnd(StreamEnd streamEnd)
NOTE: The DCP client will automatically attempt to reopen the stream
if the reason is not
StreamEndReason.OK. |
default void onMutation(Mutation mutation)
NOTE: If flow control is enabled on the client, listeners registered via
Client.nonBlockingListener(DatabaseChangeListener) and listeners using
FlowControlMode.MANUAL MUST call DocumentChange.flowControlAck()
when the application has finished processing the event, otherwise the server will
stop sending events.
default void onDeletion(Deletion deletion)
NOTE: If flow control is enabled on the client, listeners registered via
Client.nonBlockingListener(DatabaseChangeListener) and listeners using
FlowControlMode.MANUAL MUST call DocumentChange.flowControlAck()
when the application has finished processing the event, otherwise the server will
stop sending events.
default void onSeqnoAdvanced(SeqnoAdvanced seqnoAdvanced)
Collections-aware listeners SHOULD use the offset from this notification to update their stream state just as if they had received a document change at this offset. Otherwise they risk "rollback to zero" when the stream is restarted from an offset prior to the purge seqno.
Only sent if the client is collections-aware.
default void onScopeCreated(ScopeCreated scopeCreated)
The listener will only receive this notification if all of the following conditions are met:
default void onScopeDropped(ScopeDropped scopeDropped)
The listener will only receive this notification if all of the following conditions are met:
default void onCollectionCreated(CollectionCreated collectionCreated)
The listener will only receive this notification if all of the following conditions are met:
default void onCollectionDropped(CollectionDropped collectionDropped)
The listener will only receive this notification if all of the following conditions are met:
default void onCollectionFlushed(CollectionFlushed collectionFlushed)
The listener will only receive this notification if all of the following conditions are met:
default void onRollback(Rollback rollback)
default void onSnapshot(SnapshotDetails snapshotDetails)
default void onFailoverLog(FailoverLog failoverLog)
default void onStreamEnd(StreamEnd streamEnd)
StreamEndReason.OK.void onFailure(StreamFailure streamFailure)
Copyright © 2021 Couchbase, Inc.. All rights reserved.