Class StaleCheckCommand

  • All Implemented Interfaces:
    Cancellable, Command

    @Internal
    public final class StaleCheckCommand
    extends java.lang.Object
    implements Command
    Stale check command. The callback will be invoked after the client's event loop has finished processing all pending reads on the connection. If the connection is still active at that point, the callback will be completed with true. In any other event, the callback will be cancelled, failed, or completed with false.
    Since:
    5.4
    • Nested Class Summary

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.function.Consumer<java.lang.Boolean> callback  
    • Constructor Summary

      Constructors 
      Constructor Description
      StaleCheckCommand​(java.util.function.Consumer<java.lang.Boolean> callback)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean cancel()
      Cancels the ongoing operation or process.
      java.util.function.Consumer<java.lang.Boolean> getCallback()  
      • Methods inherited from class java.lang.Object

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

      • callback

        private final java.util.function.Consumer<java.lang.Boolean> callback
    • Constructor Detail

      • StaleCheckCommand

        public StaleCheckCommand​(java.util.function.Consumer<java.lang.Boolean> callback)
    • Method Detail

      • getCallback

        public java.util.function.Consumer<java.lang.Boolean> getCallback()
      • cancel

        public boolean cancel()
        Description copied from interface: Cancellable
        Cancels the ongoing operation or process.
        Specified by:
        cancel in interface Cancellable
        Returns:
        true if the operation or process has been cancelled as a result of this method call or false if it has already been cancelled or not started.