Interface CommitLogObserver
-
- All Superinterfaces:
LogObserver<Offset,CommitLogObserver.OnNextContext>
- All Known Implementing Classes:
CommitLogObservers.ForwardingObserver
,ThreadPooledObserver
,TransactionLogObserver
,TransformationObserver
,TransformationObserver.Contextual
,TransformationObserver.NonContextual
@Stable public interface CommitLogObserver extends LogObserver<Offset,CommitLogObserver.OnNextContext>
Base interface for bulk and online observers.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
CommitLogObserver.OffsetCommitter
Committer for manipulation with offset during consumption.static interface
CommitLogObserver.OnIdleContext
Context passed toonIdle(cz.o2.proxima.direct.core.commitlog.CommitLogObserver.OnIdleContext)
.static interface
CommitLogObserver.OnNextContext
Context passed toLogObserver.onNext(cz.o2.proxima.core.storage.StreamElement, ContextT)
.static interface
CommitLogObserver.OnRepartitionContext
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default void
onIdle(CommitLogObserver.OnIdleContext context)
Called when the observer is idle.default void
onRepartition(CommitLogObserver.OnRepartitionContext context)
Callback to notify of automatic repartitioning.-
Methods inherited from interface cz.o2.proxima.direct.core.LogObserver
onCancelled, onCompleted, onError, onException, onFatalError, onNext
-
-
-
-
Method Detail
-
onRepartition
default void onRepartition(CommitLogObserver.OnRepartitionContext context)
Callback to notify of automatic repartitioning. This method is always called first before anyLogObserver.onNext(cz.o2.proxima.core.storage.StreamElement, ContextT)
call happens.- Parameters:
context
- context of the repartition
-
onIdle
default void onIdle(CommitLogObserver.OnIdleContext context)
Called when the observer is idle. Note that the definition of idle is commit-log dependent and it even might NOT be called at all, if the commit log guarantees that as long as there are *any* data flowing in, thenLogObserver.onNext(cz.o2.proxima.core.storage.StreamElement, ContextT)
will be called eventually.Typical example of commit log with no need to call
onIdle(cz.o2.proxima.direct.core.commitlog.CommitLogObserver.OnIdleContext)
is google PubSub, having virtually single shared partition which loads balances incoming data.- Parameters:
context
- the context for on idle processing
-
-