Class BytesSentStreamSinkConduit
java.lang.Object
org.xnio.conduits.AbstractConduit<D>
org.xnio.conduits.AbstractSinkConduit
org.wildfly.mod_cluster.undertow.metric.BytesSentStreamSinkConduit
- All Implemented Interfaces:
org.xnio.conduits.Conduit,org.xnio.conduits.SinkConduit,org.xnio.conduits.StreamSinkConduit
public class BytesSentStreamSinkConduit
extends org.xnio.conduits.AbstractSinkConduit
implements org.xnio.conduits.StreamSinkConduit
Implementation of
StreamSinkConduit wrapping that wraps around byte-transferring methods to calculate total
number of bytes transferred leveraging LongAdder.- Since:
- 8.0
- Author:
- Radoslav Husar
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic longlongtransferFrom(FileChannel src, long position, long count) longtransferFrom(org.xnio.channels.StreamSourceChannel source, long count, ByteBuffer throughBuffer) intwrite(ByteBuffer src) longwrite(ByteBuffer[] srcs, int offs, int len) intwriteFinal(ByteBuffer src) longwriteFinal(ByteBuffer[] srcs, int offset, int length) Methods inherited from class org.xnio.conduits.AbstractSinkConduit
awaitWritable, awaitWritable, flush, getWriteThread, isWriteResumed, isWriteShutdown, resumeWrites, setWriteReadyHandler, suspendWrites, terminateWrites, truncateWrites, wakeupWritesMethods inherited from class org.xnio.conduits.AbstractConduit
getWorkerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.xnio.conduits.Conduit
getWorkerMethods inherited from interface org.xnio.conduits.SinkConduit
awaitWritable, awaitWritable, flush, getWriteThread, isWriteResumed, isWriteShutdown, resumeWrites, setWriteReadyHandler, suspendWrites, terminateWrites, truncateWrites, wakeupWrites
-
Constructor Details
-
BytesSentStreamSinkConduit
public BytesSentStreamSinkConduit(org.xnio.conduits.StreamSinkConduit next)
-
-
Method Details
-
transferFrom
- Specified by:
transferFromin interfaceorg.xnio.conduits.StreamSinkConduit- Throws:
IOException
-
transferFrom
public long transferFrom(org.xnio.channels.StreamSourceChannel source, long count, ByteBuffer throughBuffer) throws IOException - Specified by:
transferFromin interfaceorg.xnio.conduits.StreamSinkConduit- Throws:
IOException
-
write
- Specified by:
writein interfaceorg.xnio.conduits.StreamSinkConduit- Throws:
IOException
-
write
- Specified by:
writein interfaceorg.xnio.conduits.StreamSinkConduit- Throws:
IOException
-
writeFinal
- Specified by:
writeFinalin interfaceorg.xnio.conduits.StreamSinkConduit- Throws:
IOException
-
writeFinal
- Specified by:
writeFinalin interfaceorg.xnio.conduits.StreamSinkConduit- Throws:
IOException
-
getBytesSent
public static long getBytesSent()
-