Class PendingEvent


  • public class PendingEvent
    extends java.lang.Object
    This is a internal wrapper object used in the writer to pass along the routing key and the future with the actual event during write.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int MAX_WRITE_SIZE
      The serialized event max size.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected boolean canEqual​(java.lang.Object other)  
      boolean equals​(java.lang.Object o)  
      java.util.concurrent.CompletableFuture<java.lang.Void> getAckFuture()
      Callback to be invoked when the data is written.
      io.netty.buffer.ByteBuf getData()
      The data to be written.
      int getEventCount()  
      java.lang.String getRoutingKey()
      The routing key that was provided to route the data.
      int hashCode()  
      java.lang.String toString()  
      static PendingEvent withHeader​(@NonNull java.lang.String routingKey, @NonNull java.util.List<java.nio.ByteBuffer> batch, @NonNull java.util.concurrent.CompletableFuture<java.lang.Void> ackFuture)  
      static PendingEvent withHeader​(java.lang.String routingKey, java.nio.ByteBuffer data, java.util.concurrent.CompletableFuture<java.lang.Void> ackFuture)  
      static PendingEvent withoutHeader​(java.lang.String routingKey, java.nio.ByteBuffer data, java.util.concurrent.CompletableFuture<java.lang.Void> ackFuture)  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • MAX_WRITE_SIZE

        public static final int MAX_WRITE_SIZE
        The serialized event max size. Equals to the max event payload size plus additional 8 bytes for the wire command code and the payload size.
        See Also:
        for the details., Constant Field Values
    • Method Detail

      • withHeader

        public static PendingEvent withHeader​(java.lang.String routingKey,
                                              java.nio.ByteBuffer data,
                                              java.util.concurrent.CompletableFuture<java.lang.Void> ackFuture)
      • withHeader

        public static PendingEvent withHeader​(@NonNull
                                              @NonNull java.lang.String routingKey,
                                              @NonNull
                                              @NonNull java.util.List<java.nio.ByteBuffer> batch,
                                              @NonNull
                                              @NonNull java.util.concurrent.CompletableFuture<java.lang.Void> ackFuture)
      • withoutHeader

        public static PendingEvent withoutHeader​(java.lang.String routingKey,
                                                 java.nio.ByteBuffer data,
                                                 java.util.concurrent.CompletableFuture<java.lang.Void> ackFuture)
      • getRoutingKey

        public java.lang.String getRoutingKey()
        The routing key that was provided to route the data.
      • getData

        public io.netty.buffer.ByteBuf getData()
        The data to be written. Note this is limited to 8388616 bytes.
      • getEventCount

        public int getEventCount()
      • getAckFuture

        public java.util.concurrent.CompletableFuture<java.lang.Void> getAckFuture()
        Callback to be invoked when the data is written.
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • canEqual

        protected boolean canEqual​(java.lang.Object other)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object