diff --git a/classpath/java/util/concurrent/ConcurrentHashMap.java b/classpath/java/util/concurrent/ConcurrentHashMap.java index 9eb673bc8d..c2f8a169b6 100644 --- a/classpath/java/util/concurrent/ConcurrentHashMap.java +++ b/classpath/java/util/concurrent/ConcurrentHashMap.java @@ -49,6 +49,14 @@ public class ConcurrentHashMap this(); } + public ConcurrentHashMap(int initialCapacity, float loadFactor) { + this(); + } + + public ConcurrentHashMap(int initialCapacity, float loadFactor, int concurrencyLevel) { + this(); + } + public boolean isEmpty() { return content.size == 0; } diff --git a/classpath/java/util/concurrent/Delayed.java b/classpath/java/util/concurrent/Delayed.java index 16d8a49d54..10b1fc834c 100644 --- a/classpath/java/util/concurrent/Delayed.java +++ b/classpath/java/util/concurrent/Delayed.java @@ -10,6 +10,6 @@ package java.util.concurrent; -public interface Delayed { +public interface Delayed extends Comparable { public long getDelay(TimeUnit unit); } diff --git a/classpath/java/util/concurrent/ExecutorService.java b/classpath/java/util/concurrent/ExecutorService.java index f963bdff05..684432abdb 100644 --- a/classpath/java/util/concurrent/ExecutorService.java +++ b/classpath/java/util/concurrent/ExecutorService.java @@ -14,6 +14,8 @@ import java.util.Collection; public interface ExecutorService extends Executor { public void shutdown(); + + public List shutdownNow(); public boolean isShutdown(); diff --git a/classpath/java/util/concurrent/Executors.java b/classpath/java/util/concurrent/Executors.java new file mode 100644 index 0000000000..cd959faf42 --- /dev/null +++ b/classpath/java/util/concurrent/Executors.java @@ -0,0 +1,24 @@ +/* Copyright (c) 2008-2014, Avian Contributors + + Permission to use, copy, modify, and/or distribute this software + for any purpose with or without fee is hereby granted, provided + that the above copyright notice and this permission notice appear + in all copies. + + There is NO WARRANTY for this software. See license.txt for + details. */ + +package java.util.concurrent; + +public class Executors { + public static Callable callable(final Runnable task, final T result) { + return new Callable() { + @Override + public T call() throws Exception { + task.run(); + + return result; + } + }; + } +}