Class MessageHandler.PubSubMessageQueue

  • Enclosing class:
    MessageHandler

    public static class MessageHandler.PubSubMessageQueue
    extends java.lang.Object
    An asynchronous FIFO message queue for PubSubMessage backed by ConcurrentLinkedDeque.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.concurrent.CompletableFuture<PubSubMessage> popAsync()
      Get a promise for a next message.
      PubSubMessage popSync()
      Get a new message or null if nothing stored so far.
      void push​(PubSubMessage message)
      Store a new message.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PubSubMessageQueue

        public PubSubMessageQueue()
    • Method Detail

      • push

        public void push​(PubSubMessage message)
        Store a new message.
      • popAsync

        public java.util.concurrent.CompletableFuture<PubSubMessage> popAsync()
        Get a promise for a next message.
      • popSync

        public PubSubMessage popSync()
        Get a new message or null if nothing stored so far.