public class RetryPolicy extends Object implements FailurePolicy
EventDeliveryException
.Modifier and Type | Class and Description |
---|---|
static class |
RetryPolicy.Builder |
Modifier and Type | Method and Description |
---|---|
void |
close()
Close this FailurePolicy and release any resources.
|
void |
handle(Event event,
Throwable cause)
Handle a non-recoverable event.
|
void |
sync()
Ensure any handled events are on stable storage.
|
public void handle(Event event, Throwable cause) throws EventDeliveryException
FailurePolicy
handle
in interface FailurePolicy
event
- The eventcause
- The cause of the failureEventDeliveryException
- The policy failed to handle the event. When
this is thrown, the Flume transaction will
be rolled back and the event will be retried
along with the rest of the batch.public void sync() throws EventDeliveryException
FailurePolicy
Syncable.sync()
.sync
in interface FailurePolicy
EventDeliveryException
- The policy failed while syncing data.
When this is thrown, the Flume transaction
will be rolled back and the batch will be
retried.public void close() throws EventDeliveryException
FailurePolicy
close
in interface FailurePolicy
EventDeliveryException
- The policy failed while closing resources.
When this is thrown, the Flume transaction
will be rolled back and the batch will be
retried.Copyright © 2009–2019 Apache Software Foundation. All rights reserved.