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
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description void
onCompletion(java.lang.String docId, Result documentResult)
default void
onEndpointException(FeedEndpointException exception)
Called with an exception whenever an endpoint specific error occurs during feeding.
-
-
-
Method Detail
-
onCompletion
void onCompletion(java.lang.String docId, Result documentResult)
-
onEndpointException
default void onEndpointException(FeedEndpointException exception)
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:
FeedEndpointException
-
-