Module 

Interface SuspendableReadChannel

    • Method Detail

      • suspendReads

        void suspendReads()
        Suspend further read notifications on this channel.
      • resumeReads

        void resumeReads()
        Resume reads on this channel. The read listener will be called as soon as there is data available to be read.
      • isReadResumed

        boolean isReadResumed()
        Determine whether reads are resumed.
        Returns:
        true if reads are resumed, false if reads are suspended
      • wakeupReads

        @Deprecated
        void wakeupReads()
        Deprecated.
        Users should instead submit Runnable tasks to the channel thread when this functionality is needed.
        Resume reads on this channel, and force the read listener to be triggered even if the channel isn't actually readable.
      • shutdownReads

        void shutdownReads()
                    throws java.io.IOException
        Places this readable channel at "end of stream". Further reads will result in EOF. Shutting down all directions of a channel will cause CloseableChannel.close() to be called automatically.
        Throws:
        java.io.IOException - if an I/O error occurs
      • awaitReadable

        void awaitReadable()
                    throws java.io.IOException
        Block until this channel becomes readable again. This method may return spuriously before the channel becomes readable.
        Throws:
        java.io.InterruptedIOException - if the operation is interrupted; the thread's interrupt flag will be set as well
        java.io.IOException - if an I/O error occurs
        Since:
        1.2
      • awaitReadable

        void awaitReadable​(long time,
                           java.util.concurrent.TimeUnit timeUnit)
                    throws java.io.IOException
        Block until this channel becomes readable again, or until the timeout expires. This method may return spuriously before the channel becomes readable or the timeout expires.
        Parameters:
        time - the time to wait
        timeUnit - the time unit
        Throws:
        java.io.InterruptedIOException - if the operation is interrupted; the thread's interrupt flag will be set as well
        java.io.IOException - if an I/O error occurs
        Since:
        1.2
      • getReadThread

        @Deprecated
        XnioExecutor getReadThread()
        Deprecated.
        The CloseableChannel.getIoThread() method should be used instead.
        Get the read thread for this channel.
        Returns:
        the thread, or null if none is configured or available