@Test void retryOnError() { countOnly.retryOnError(10, EdsdkError.EDS_ERR_DEVICE_BUSY) .run(); assertCounts(1, 0); countOnly.retryOnError(10, EdsdkError.EDS_ERR_DEVICE_BUSY, EdsdkError.EDS_ERR_DEVICE_DISK_ERROR) .run(); assertCounts(2, 0); countOnly.retryOnError(5, 2, EdsdkError.EDS_ERR_DEVICE_BUSY, EdsdkError.EDS_ERR_DEVICE_DISK_ERROR) .run(); assertCounts(3, 0); countOnly.retryOnError(5, 2, EdsdkError.EDS_ERR_DEVICE_DISK_ERROR) .run(); assertCounts(4, 0); }
public NameToBeDefined retryOnError(final long delayMillis, final EdsdkError errors) { return retryOnError(delayMillis, 0, Collections.singletonList(errors)); }
NameToBeDefined implements Runnable { public NameToBeDefined retryOnError(final long delayMillis, final EdsdkError errors) { return retryOnError(delayMillis, 0, Collections.singletonList(errors)); } }
NameToBeDefined implements Runnable { public NameToBeDefined retryOnError(final long delayMillis, final EdsdkError errors) { return retryOnError(delayMillis, 0, Collections.singletonList(errors)); } protected  NameToBeDefined(Runnable runnableToDecorate); }
NameToBeDefined implements Runnable { public NameToBeDefined retryOnError(final long delayMillis, final EdsdkError errors) { return retryOnError(delayMillis, 0, Collections.singletonList(errors)); } protected  NameToBeDefined(Runnable runnableToDecorate); static NameToBeDefined wrap(final Runnable runnableToDecorate); NameToBeDefined retryOnBusy(); NameToBeDefined retryOnBusy(final long delayMillis); NameToBeDefined retryOnBusy(final long... delayMillis); NameToBeDefined retryOnBusy(final long delayMillis, final int retryTimes); NameToBeDefined retryOnError(final long delayMillis, final EdsdkError errors); NameToBeDefined retryOnError(final long delayMillis, final EdsdkError... errors); NameToBeDefined retryOnError(final long delayMillis, final int retryTimes, final EdsdkError errors); NameToBeDefined retryOnError(final long delayMillis, final int retryTimes, final EdsdkError... errors); NameToBeDefined retryOnError(final long delayMillis, final int retryTimes, final List<EdsdkError> errors); NameToBeDefined runOnError(final Runnable runOnError, final EdsdkError error); NameToBeDefined runOnError(final Runnable runOnError, final EdsdkError... errors); NameToBeDefined runOnError(final Runnable runOnError, final List<EdsdkError> errors); @Override void run(); void handle(Consumer<Throwable> consumer); R handle(Function<Throwable, R> function); }
NameToBeDefined implements Runnable { public NameToBeDefined retryOnError(final long delayMillis, final EdsdkError errors) { return retryOnError(delayMillis, 0, Collections.singletonList(errors)); } protected  NameToBeDefined(Runnable runnableToDecorate); static NameToBeDefined wrap(final Runnable runnableToDecorate); NameToBeDefined retryOnBusy(); NameToBeDefined retryOnBusy(final long delayMillis); NameToBeDefined retryOnBusy(final long... delayMillis); NameToBeDefined retryOnBusy(final long delayMillis, final int retryTimes); NameToBeDefined retryOnError(final long delayMillis, final EdsdkError errors); NameToBeDefined retryOnError(final long delayMillis, final EdsdkError... errors); NameToBeDefined retryOnError(final long delayMillis, final int retryTimes, final EdsdkError errors); NameToBeDefined retryOnError(final long delayMillis, final int retryTimes, final EdsdkError... errors); NameToBeDefined retryOnError(final long delayMillis, final int retryTimes, final List<EdsdkError> errors); NameToBeDefined runOnError(final Runnable runOnError, final EdsdkError error); NameToBeDefined runOnError(final Runnable runOnError, final EdsdkError... errors); NameToBeDefined runOnError(final Runnable runOnError, final List<EdsdkError> errors); @Override void run(); void handle(Consumer<Throwable> consumer); R handle(Function<Throwable, R> function);  }