0
votes
1answer
85 views

Callbacks for scheduled future in java

Are there any ways to add callbacks(on success, on fail) to ScheduledFuture? Seems guava with ListneableFuture doesn't provide this.
3
votes
2answers
113 views

Least value concurrent map

I require an implementation of a map, that supports concurrency, and only stores the least/most value added (depending on the comparator). Would the following code work? class ...
4
votes
1answer
945 views

Guava MapMaker().weakKeys().makeMap() vs WeakHashMap

We have a Scala server that is getting a node tree using Protocol Buffers over a socket and we need to attach additional data to each node. In a single threaded context and when both the node tree ...
16
votes
3answers
4k views

is there java.concurrent.util (or equivalent) for WeakHashMap?

Can the following piece of code be rewritten w/o using Collections.synchronizedMap() yet maintaining correctness at concurrency? Collections.synchronizedMap(new WeakHashMap<Class, Object>()); ...