public abstract class AbstractSynchronizedSinkConduit<D extends SinkConduit> extends AbstractSynchronizedConduit<D> implements SinkConduit
locknext| Modifier | Constructor and Description |
|---|---|
protected |
AbstractSynchronizedSinkConduit(D next) |
protected |
AbstractSynchronizedSinkConduit(D next,
Object lock) |
| Modifier and Type | Method and Description |
|---|---|
void |
awaitWritable()
Block until this channel becomes writable again.
|
void |
awaitWritable(long time,
TimeUnit timeUnit)
Block until this conduit becomes writable again, or until the timeout expires.
|
boolean |
flush()
Flush out any unwritten, buffered output.
|
XnioIoThread |
getWriteThread()
Get the write thread for this conduit.
|
boolean |
isWriteResumed()
Determine whether write notifications are currently enabled.
|
boolean |
isWriteShutdown()
Determine whether writes have been fully shut down on this conduit.
|
void |
resumeWrites()
Indicate that the conduit's
WriteReadyHandler should be invoked as soon as data can be written
without blocking. |
void |
setWriteReadyHandler(WriteReadyHandler handler)
Set the handler which should receive readiness notifications.
|
void |
suspendWrites()
Indicate that calling the conduit's
WriteReadyHandler should be suspended. |
void |
terminateWrites()
Signal that no more write data is forthcoming.
|
void |
truncateWrites()
Terminate writes and discard any outstanding write data.
|
void |
wakeupWrites()
Indicate that the conduit's
WriteReadyHandler should be invoked immediately, and then again as soon
as data can be written without blocking. |
getWorkerprotected AbstractSynchronizedSinkConduit(D next)
public void terminateWrites()
throws IOException
SinkConduitSinkConduit.flush()ed before it is considered
to be shut down.terminateWrites in interface SinkConduitIOExceptionpublic boolean isWriteShutdown()
SinkConduitisWriteShutdown in interface SinkConduittrue if writes are fully shut down, false otherwisepublic void resumeWrites()
SinkConduitWriteReadyHandler should be invoked as soon as data can be written
without blocking.resumeWrites in interface SinkConduitpublic void suspendWrites()
SinkConduitWriteReadyHandler should be suspended.suspendWrites in interface SinkConduitpublic void wakeupWrites()
SinkConduitWriteReadyHandler should be invoked immediately, and then again as soon
as data can be written without blocking.wakeupWrites in interface SinkConduitpublic boolean isWriteResumed()
SinkConduitisWriteResumed in interface SinkConduittrue if write notifications are enabledpublic void awaitWritable()
throws IOException
SinkConduitawaitWritable in interface SinkConduitInterruptedIOException - if the operation is interrupted; the thread's interrupt flag will be set
as wellIOException - if an I/O error occurspublic void awaitWritable(long time,
TimeUnit timeUnit)
throws IOException
SinkConduitawaitWritable in interface SinkConduittime - 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 getWriteThread()
SinkConduitgetWriteThread in interface SinkConduitnull if none is configured or availablepublic void setWriteReadyHandler(WriteReadyHandler handler)
SinkConduitsetWriteReadyHandler in interface SinkConduitpublic void truncateWrites()
throws IOException
SinkConduittruncateWrites in interface SinkConduitIOException - if channel termination failed for some reasonpublic boolean flush()
throws IOException
SinkConduitflush in interface SinkConduittrue if everything is flushed, false otherwiseIOException - if flush failsCopyright © 2017 JBoss by Red Hat. All rights reserved.