summaryrefslogtreecommitdiffstats
path: root/vespajlib
diff options
context:
space:
mode:
Diffstat (limited to 'vespajlib')
-rw-r--r--vespajlib/abi-spec.json1
-rw-r--r--vespajlib/src/main/java/com/yahoo/yolean/concurrent/Memoized.java8
2 files changed, 0 insertions, 9 deletions
diff --git a/vespajlib/abi-spec.json b/vespajlib/abi-spec.json
index 8a2e68a8d8c..a22e24aafc2 100644
--- a/vespajlib/abi-spec.json
+++ b/vespajlib/abi-spec.json
@@ -3833,7 +3833,6 @@
"public"
],
"methods" : [
- "public void <init>(java.util.function.Supplier)",
"public void <init>(java.util.function.Supplier, com.yahoo.yolean.concurrent.Memoized$Closer)",
"public static com.yahoo.yolean.concurrent.Memoized of(java.util.function.Supplier)",
"public static com.yahoo.yolean.concurrent.Memoized combine(com.yahoo.yolean.concurrent.Memoized, java.util.function.Function, com.yahoo.yolean.concurrent.Memoized$Closer)",
diff --git a/vespajlib/src/main/java/com/yahoo/yolean/concurrent/Memoized.java b/vespajlib/src/main/java/com/yahoo/yolean/concurrent/Memoized.java
index ba5ef7bab2d..8e2b7b7a7eb 100644
--- a/vespajlib/src/main/java/com/yahoo/yolean/concurrent/Memoized.java
+++ b/vespajlib/src/main/java/com/yahoo/yolean/concurrent/Memoized.java
@@ -34,23 +34,15 @@ public class Memoized<T, E extends Exception> implements Supplier<T>, AutoClosea
private volatile T wrapped;
private Supplier<T> factory;
- /** Returns a new Memoized which has no close method. */
- public Memoized(Supplier<T> factory) {
- this(factory, __ -> { });
- }
-
- /** Returns a new Memoized with the given factory and closer. */
public Memoized(Supplier<T> factory, Closer<T, E> closer) {
this.factory = requireNonNull(factory);
this.closer = requireNonNull(closer);
}
- /** Returns a generic AutoCloseable Memoized with the given AutoCloseable-supplier. */
public static <T extends AutoCloseable> Memoized<T, ?> of(Supplier<T> factory) {
return new Memoized<>(factory, AutoCloseable::close);
}
- /** Composes the given memoized with a function taking its output as an argument to produce a new Memoized, with the given closer. */
public static <T, U, E extends Exception> Memoized<U, E> combine(Memoized<T, ? extends E> inner, Function<T, U> outer, Closer<U, ? extends E> closer) {
return new Memoized<>(() -> outer.apply(inner.get()), compose(closer, inner::close));
}