@Test public void testExecuteOperation() { TestOperation operation = new TestOperation(RetryingExecutor.RESULT_FINISHED); executor.execute(operation); assertEquals(1, operation.runCount); }
@Override public void execute(@NonNull final Runnable runnable) { execute(new Operation() { @Override public int run() { runnable.run(); return RESULT_FINISHED; } }); }
RetryingExecutor implements Executor { @Override public void execute(@NonNull final Runnable runnable) { execute(new Operation() { @Override public int run() { runnable.run(); return RESULT_FINISHED; } }); } }
RetryingExecutor implements Executor { @Override public void execute(@NonNull final Runnable runnable) { execute(new Operation() { @Override public int run() { runnable.run(); return RESULT_FINISHED; } }); } RetryingExecutor(@NonNull Handler scheduler, @NonNull Executor executor); }
RetryingExecutor implements Executor { @Override public void execute(@NonNull final Runnable runnable) { execute(new Operation() { @Override public int run() { runnable.run(); return RESULT_FINISHED; } }); } RetryingExecutor(@NonNull Handler scheduler, @NonNull Executor executor); static RetryingExecutor newSerialExecutor(Looper looper); @Override void execute(@NonNull final Runnable runnable); void execute(@NonNull Operation operation); void execute(@NonNull Operation... operations); void setPaused(boolean isPaused); }
RetryingExecutor implements Executor { @Override public void execute(@NonNull final Runnable runnable) { execute(new Operation() { @Override public int run() { runnable.run(); return RESULT_FINISHED; } }); } RetryingExecutor(@NonNull Handler scheduler, @NonNull Executor executor); static RetryingExecutor newSerialExecutor(Looper looper); @Override void execute(@NonNull final Runnable runnable); void execute(@NonNull Operation operation); void execute(@NonNull Operation... operations); void setPaused(boolean isPaused); static final int RESULT_FINISHED; static final int RESULT_RETRY; static final int RESULT_CANCEL; }