Module 

Class AbstractSynchronizedSourceConduit<D extends SourceConduit>

    • Constructor Detail

      • AbstractSynchronizedSourceConduit

        protected AbstractSynchronizedSourceConduit​(D next)
        Construct a new instance. A new lock object is created.
        Parameters:
        next - the next conduit in the chain
      • AbstractSynchronizedSourceConduit

        protected AbstractSynchronizedSourceConduit​(D next,
                                                    java.lang.Object lock)
        Construct a new instance.
        Parameters:
        next - the next conduit in the chain
        lock - the lock object to use
    • Method Detail

      • terminateReads

        public void terminateReads()
                            throws java.io.IOException
        Description copied from interface: SourceConduit
        Indicate that no more data will be read from this conduit. If unread data exists, an exception may be thrown.
        Specified by:
        terminateReads in interface SourceConduit
        Throws:
        java.io.IOException - if there was a problem
      • isReadShutdown

        public boolean isReadShutdown()
        Description copied from interface: SourceConduit
        Determine whether reads have been shut down on this conduit.
        Specified by:
        isReadShutdown in interface SourceConduit
        Returns:
        true if writes are shut down, false otherwise
      • wakeupReads

        public void wakeupReads()
        Description copied from interface: SourceConduit
        Indicate that the conduit's ReadReadyHandler should be invoked immediately, and then again as soon as data can be read without blocking.
        Specified by:
        wakeupReads in interface SourceConduit
      • isReadResumed

        public boolean isReadResumed()
        Description copied from interface: SourceConduit
        Determine whether read notifications are currently enabled.
        Specified by:
        isReadResumed in interface SourceConduit
        Returns:
        true if read notifications are enabled
      • awaitReadable

        public void awaitReadable()
                           throws java.io.IOException
        Description copied from interface: SourceConduit
        Block until this channel becomes readable again. This method may return spuriously before the channel becomes readable.
        Specified by:
        awaitReadable in interface SourceConduit
        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
      • awaitReadable

        public void awaitReadable​(long time,
                                  java.util.concurrent.TimeUnit timeUnit)
                           throws java.io.IOException
        Description copied from interface: SourceConduit
        Block until this conduit becomes readable again, or until the timeout expires. This method may return spuriously before the conduit becomes readable or the timeout expires.
        Specified by:
        awaitReadable in interface SourceConduit
        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
      • setReadReadyHandler

        public void setReadReadyHandler​(ReadReadyHandler handler)
        Description copied from interface: SourceConduit
        Set the handler which should receive readiness notifications. A filter may pass this invocation on to the filter it wraps, or it may substitute itself.
        Specified by:
        setReadReadyHandler in interface SourceConduit