mirror of
https://github.com/corda/corda.git
synced 2025-01-06 05:04:20 +00:00
Merge pull request #382 from jentfoo/master
Some small classpath tweaks to be compatible with openJDK's api
This commit is contained in:
commit
4d9c649676
@ -49,6 +49,14 @@ public class ConcurrentHashMap<K,V>
|
|||||||
this();
|
this();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public ConcurrentHashMap(int initialCapacity, float loadFactor) {
|
||||||
|
this();
|
||||||
|
}
|
||||||
|
|
||||||
|
public ConcurrentHashMap(int initialCapacity, float loadFactor, int concurrencyLevel) {
|
||||||
|
this();
|
||||||
|
}
|
||||||
|
|
||||||
public boolean isEmpty() {
|
public boolean isEmpty() {
|
||||||
return content.size == 0;
|
return content.size == 0;
|
||||||
}
|
}
|
||||||
|
@ -10,6 +10,6 @@
|
|||||||
|
|
||||||
package java.util.concurrent;
|
package java.util.concurrent;
|
||||||
|
|
||||||
public interface Delayed {
|
public interface Delayed extends Comparable<Delayed> {
|
||||||
public long getDelay(TimeUnit unit);
|
public long getDelay(TimeUnit unit);
|
||||||
}
|
}
|
||||||
|
@ -14,6 +14,8 @@ import java.util.Collection;
|
|||||||
|
|
||||||
public interface ExecutorService extends Executor {
|
public interface ExecutorService extends Executor {
|
||||||
public void shutdown();
|
public void shutdown();
|
||||||
|
|
||||||
|
public List<Runnable> shutdownNow();
|
||||||
|
|
||||||
public boolean isShutdown();
|
public boolean isShutdown();
|
||||||
|
|
||||||
|
24
classpath/java/util/concurrent/Executors.java
Normal file
24
classpath/java/util/concurrent/Executors.java
Normal file
@ -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 <T> Callable<T> callable(final Runnable task, final T result) {
|
||||||
|
return new Callable<T>() {
|
||||||
|
@Override
|
||||||
|
public T call() throws Exception {
|
||||||
|
task.run();
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user