Replaced Timer with ScheduledExecutorService. #258

This commit is contained in:
akwizgran
2016-05-05 11:07:58 +01:00
parent 036c5d6753
commit ff8301521c
26 changed files with 201 additions and 212 deletions

View File

@@ -1,27 +0,0 @@
package org.briarproject.api.system;
import java.util.TimerTask;
/**
* A wrapper around a {@link java.util.Timer} that allows it to be replaced for
* testing.
*/
public interface Timer {
/** @see {@link java.util.Timer#cancel()} */
void cancel();
/** @see {@link java.util.Timer#purge()} */
int purge();
/** @see {@link java.util.Timer#schedule(TimerTask, long)} */
void schedule(TimerTask task, long delay);
/** @see {@link java.util.Timer#schedule(TimerTask, long, long)} */
void schedule(TimerTask task, long delay, long period);
/**
* @see {@link java.util.Timer#scheduleAtFixedRate(TimerTask, long, long)}
*/
void scheduleAtFixedRate(TimerTask task, long delay, long period);
}