Document the contract of DatabaseExecutor.

This commit is contained in:
akwizgran
2014-11-08 16:40:22 +00:00
parent 4009561996
commit 9dbabdeceb
3 changed files with 10 additions and 3 deletions

View File

@@ -28,7 +28,7 @@ public class CryptoModule extends AbstractModule {
private final ExecutorService cryptoExecutor;
public CryptoModule() {
// The queue is unbounded, so tasks can be dependent
// Use an unbounded queue
BlockingQueue<Runnable> queue = new LinkedBlockingQueue<Runnable>();
// Discard tasks that are submitted during shutdown
RejectedExecutionHandler policy =
@@ -38,6 +38,7 @@ public class CryptoModule extends AbstractModule {
60, SECONDS, queue, policy);
}
@Override
protected void configure() {
bind(CryptoComponent.class).to(
CryptoComponentImpl.class).in(Singleton.class);

View File

@@ -29,7 +29,7 @@ public class DatabaseModule extends AbstractModule {
private final ExecutorService databaseExecutor;
public DatabaseModule() {
// The queue is unbounded, so tasks can be dependent
// Use an unbounded queue
BlockingQueue<Runnable> queue = new LinkedBlockingQueue<Runnable>();
// Discard tasks that are submitted during shutdown
RejectedExecutionHandler policy =