Package com.yahoo.vespa.http.client
Interface FeedClient.ResultCallback
- All Known Implementing Classes:
SimpleLoggerResultCallback
- Enclosing interface:
- FeedClient
public static interface FeedClient.ResultCallback
This callback is executed when new results are arriving or an error occur.
Don't do any heavy lifting in this thread (no IO, disk, or heavy CPU usage).
This call back will run in a different thread than your main program so use e.g.
AtomicInteger for counters and follow general guides for thread-safe programming.
There is an example implementation in class SimpleLoggerResultCallback.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
onCompletion
(String docId, Result documentResult) This callback is always called exactly once for each feed operation passed to the client instance, whether or not it was successful.default void
onEndpointException
(FeedEndpointException exception) Called with an exception whenever an endpoint specific error occurs during feeding.
-
Method Details
-
onCompletion
This callback is always called exactly once for each feed operation passed to the client instance, whether or not it was successful. -
onEndpointException
Called with an exception whenever an endpoint specific error occurs during feeding. The error may or may not be transient - the operation will in both cases be retried until it's successful. This callback is intended for application level monitoring (logging, metrics, altering etc). Document specific errors will be reported back throughonCompletion(String, Result)
.- Parameters:
exception
- an exception specifying endpoint and cause. SeeFeedEndpointException
for details.- See Also:
-