public class BytesSentStreamSinkConduit
extends org.xnio.conduits.AbstractSinkConduit
implements org.xnio.conduits.StreamSinkConduit
StreamSinkConduit wrapping that wraps around byte-transferring methods to calculate total
number of bytes transferred leveraging LongAdder.| Constructor and Description |
|---|
BytesSentStreamSinkConduit(org.xnio.conduits.StreamSinkConduit next) |
| Modifier and Type | Method and Description |
|---|---|
static long |
getBytesSent() |
long |
transferFrom(FileChannel src,
long position,
long count) |
long |
transferFrom(org.xnio.channels.StreamSourceChannel source,
long count,
ByteBuffer throughBuffer) |
int |
write(ByteBuffer src) |
long |
write(ByteBuffer[] srcs,
int offs,
int len) |
int |
writeFinal(ByteBuffer src) |
long |
writeFinal(ByteBuffer[] srcs,
int offset,
int length) |
awaitWritable, awaitWritable, flush, getWriteThread, isWriteResumed, isWriteShutdown, resumeWrites, setWriteReadyHandler, suspendWrites, terminateWrites, truncateWrites, wakeupWritesclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitpublic BytesSentStreamSinkConduit(org.xnio.conduits.StreamSinkConduit next)
public long transferFrom(FileChannel src, long position, long count) throws IOException
transferFrom in interface org.xnio.conduits.StreamSinkConduitIOExceptionpublic long transferFrom(org.xnio.channels.StreamSourceChannel source,
long count,
ByteBuffer throughBuffer)
throws IOException
transferFrom in interface org.xnio.conduits.StreamSinkConduitIOExceptionpublic int write(ByteBuffer src) throws IOException
write in interface org.xnio.conduits.StreamSinkConduitIOExceptionpublic long write(ByteBuffer[] srcs, int offs, int len) throws IOException
write in interface org.xnio.conduits.StreamSinkConduitIOExceptionpublic int writeFinal(ByteBuffer src) throws IOException
writeFinal in interface org.xnio.conduits.StreamSinkConduitIOExceptionpublic long writeFinal(ByteBuffer[] srcs, int offset, int length) throws IOException
writeFinal in interface org.xnio.conduits.StreamSinkConduitIOExceptionpublic static long getBytesSent()
Copyright © 2021 JBoss by Red Hat. All rights reserved.