Class 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.
    • Nested Class Summary

      • Nested classes/interfaces inherited from class java.util.AbstractMap

        java.util.AbstractMap.SimpleEntry<K extends java.lang.Object,​V extends java.lang.Object>, java.util.AbstractMap.SimpleImmutableEntry<K extends java.lang.Object,​V extends java.lang.Object>
      • Nested classes/interfaces inherited from interface java.util.Map

        java.util.Map.Entry<K extends java.lang.Object,​V extends java.lang.Object>
    • 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
      • Methods inherited from class java.lang.Object

        finalize, getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.util.Map

        compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
    • Constructor Detail

      • BlockingMap

        BlockingMap()
        Constructor.
    • Method Detail

      • entrySet

        public java.util.Set entrySet()
        Specified by:
        entrySet in interface java.util.Map
        Specified by:
        entrySet in class java.util.AbstractMap
      • put

        public java.lang.Object put​(java.lang.Object key,
                                    java.lang.Object value)
        Specified by:
        put in interface java.util.Map
        Overrides:
        put in class java.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.