public interface SinkConduit extends Conduit
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. |
void terminateWrites() throws IOException
flush()
ed before it is considered
to be shut down.IOException
boolean isWriteShutdown()
true
if writes are fully shut down, false
otherwisevoid resumeWrites()
WriteReadyHandler
should be invoked as soon as data can be written
without blocking.void suspendWrites()
WriteReadyHandler
should be suspended.void wakeupWrites()
WriteReadyHandler
should be invoked immediately, and then again as soon
as data can be written without blocking.boolean isWriteResumed()
true
if write notifications are enabledvoid awaitWritable() throws IOException
InterruptedIOException
- if the operation is interrupted; the thread's interrupt flag will be set
as wellIOException
- if an I/O error occursvoid awaitWritable(long time, TimeUnit timeUnit) throws IOException
time
- 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 occursXnioIoThread getWriteThread()
null
if none is configured or availablevoid setWriteReadyHandler(WriteReadyHandler handler)
next
- the filter to receive readiness notificationsvoid truncateWrites() throws IOException
IOException
- if channel termination failed for some reasonboolean flush() throws IOException
true
if everything is flushed, false
otherwiseIOException
- if flush failsCopyright © 2019 JBoss by Red Hat. All rights reserved.