public abstract class AbstractSynchronizedSourceConduit<D extends SourceConduit> extends AbstractSynchronizedConduit<D> implements SourceConduit
locknext| Modifier | Constructor and Description |
|---|---|
protected |
AbstractSynchronizedSourceConduit(D next)
Construct a new instance.
|
protected |
AbstractSynchronizedSourceConduit(D next,
Object lock)
Construct a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
void |
awaitReadable()
Block until this channel becomes readable again.
|
void |
awaitReadable(long time,
TimeUnit timeUnit)
Block until this conduit becomes readable again, or until the timeout expires.
|
XnioIoThread |
getReadThread()
Get the XNIO read thread.
|
boolean |
isReadResumed()
Determine whether read notifications are currently enabled.
|
boolean |
isReadShutdown()
Determine whether reads have been shut down on this conduit.
|
void |
resumeReads()
Indicate that the conduit's
ReadReadyHandler should be invoked as soon as data can be read
without blocking. |
void |
setReadReadyHandler(ReadReadyHandler handler)
Set the handler which should receive readiness notifications.
|
void |
suspendReads()
Indicate that calling the conduit's
ReadReadyHandler should be suspended. |
void |
terminateReads()
Indicate that no more data will be read from this conduit.
|
void |
wakeupReads()
Indicate that the conduit's
ReadReadyHandler should be invoked immediately, and then again as soon
as data can be read without blocking. |
getWorkerprotected AbstractSynchronizedSourceConduit(D next)
next - the next conduit in the chainpublic void terminateReads()
throws IOException
SourceConduitterminateReads in interface SourceConduitIOException - if there was a problempublic boolean isReadShutdown()
SourceConduitisReadShutdown in interface SourceConduittrue if writes are shut down, false otherwisepublic void resumeReads()
SourceConduitReadReadyHandler should be invoked as soon as data can be read
without blocking.resumeReads in interface SourceConduitpublic void suspendReads()
SourceConduitReadReadyHandler should be suspended.suspendReads in interface SourceConduitpublic void wakeupReads()
SourceConduitReadReadyHandler should be invoked immediately, and then again as soon
as data can be read without blocking.wakeupReads in interface SourceConduitpublic boolean isReadResumed()
SourceConduitisReadResumed in interface SourceConduittrue if read notifications are enabledpublic void awaitReadable()
throws IOException
SourceConduitawaitReadable in interface SourceConduitInterruptedIOException - if the operation is interrupted; the thread's interrupt flag will be set as wellIOException - if an I/O error occurspublic void awaitReadable(long time,
TimeUnit timeUnit)
throws IOException
SourceConduitawaitReadable in interface SourceConduittime - the time to waittimeUnit - the time unitInterruptedIOException - if the operation is interrupted; the thread's interrupt flag will be set as wellIOException - if an I/O error occurspublic XnioIoThread getReadThread()
SourceConduitgetReadThread in interface SourceConduitpublic void setReadReadyHandler(ReadReadyHandler handler)
SourceConduitsetReadReadyHandler in interface SourceConduitCopyright © 2016 JBoss by Red Hat. All rights reserved.