Package org.astrogrid.samp.test
Class MessageSender.BlockingMap
- java.lang.Object
-
- java.util.AbstractMap
-
- org.astrogrid.samp.test.MessageSender.BlockingMap
-
- All Implemented Interfaces:
java.util.Map
- Enclosing class:
- MessageSender
private static class MessageSender.BlockingMap extends java.util.AbstractMap
Map implementation which dispenses its contents via an iterator which will block until all the results are in. This makes it suitable for use from other threads.
-
-
Field Summary
Fields Modifier and Type Field Description private MessageSender.BlockingSet
entrySet_
-
Constructor Summary
Constructors Constructor Description BlockingMap()
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) void
done()
Indicates that no more entries will be added to this map.java.util.Set
entrySet()
java.lang.Object
put(java.lang.Object key, java.lang.Object value)
-
Methods inherited from class java.util.AbstractMap
clear, clone, containsKey, containsValue, equals, get, hashCode, isEmpty, keySet, putAll, remove, size, toString, values
-
-
-
-
Field Detail
-
entrySet_
private final MessageSender.BlockingSet entrySet_
-
-
Method Detail
-
entrySet
public java.util.Set entrySet()
- Specified by:
entrySet
in interfacejava.util.Map
- Specified by:
entrySet
in classjava.util.AbstractMap
-
put
public java.lang.Object put(java.lang.Object key, java.lang.Object value)
- Specified by:
put
in interfacejava.util.Map
- Overrides:
put
in classjava.util.AbstractMap
-
done
void done()
Indicates that no more entries will be added to this map. Must be called by populator or entry set iterator will block indefinitely.
-
-