Class BytesReceivedStreamSourceConduit
java.lang.Object
org.xnio.conduits.AbstractConduit<D>
org.xnio.conduits.AbstractSourceConduit
org.wildfly.mod_cluster.undertow.metric.BytesReceivedStreamSourceConduit
- All Implemented Interfaces:
org.xnio.conduits.Conduit,org.xnio.conduits.SourceConduit,org.xnio.conduits.StreamSourceConduit
public class BytesReceivedStreamSourceConduit
extends org.xnio.conduits.AbstractSourceConduit
implements org.xnio.conduits.StreamSourceConduit
Implementation of
StreamSourceConduit wrapping that wraps around byte-transferring methods to calculate total
number of bytes transferred leveraging LongAdder.- Since:
- 8.0
- Author:
- Radoslav Husar
-
Constructor Summary
ConstructorsConstructorDescriptionBytesReceivedStreamSourceConduit(org.xnio.conduits.StreamSourceConduit next) -
Method Summary
Modifier and TypeMethodDescriptionstatic longintread(ByteBuffer dst) longread(ByteBuffer[] dsts, int offs, int len) longtransferTo(long position, long count, FileChannel target) longtransferTo(long count, ByteBuffer throughBuffer, org.xnio.channels.StreamSinkChannel target) Methods inherited from class org.xnio.conduits.AbstractSourceConduit
awaitReadable, awaitReadable, getReadThread, isReadResumed, isReadShutdown, resumeReads, setReadReadyHandler, suspendReads, terminateReads, wakeupReadsMethods 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.SourceConduit
awaitReadable, awaitReadable, getReadThread, isReadResumed, isReadShutdown, resumeReads, setReadReadyHandler, suspendReads, terminateReads, wakeupReads
-
Constructor Details
-
BytesReceivedStreamSourceConduit
public BytesReceivedStreamSourceConduit(org.xnio.conduits.StreamSourceConduit next)
-
-
Method Details
-
transferTo
- Specified by:
transferToin interfaceorg.xnio.conduits.StreamSourceConduit- Throws:
IOException
-
transferTo
public long transferTo(long count, ByteBuffer throughBuffer, org.xnio.channels.StreamSinkChannel target) throws IOException - Specified by:
transferToin interfaceorg.xnio.conduits.StreamSourceConduit- Throws:
IOException
-
read
- Specified by:
readin interfaceorg.xnio.conduits.StreamSourceConduit- Throws:
IOException
-
read
- Specified by:
readin interfaceorg.xnio.conduits.StreamSourceConduit- Throws:
IOException
-
getBytesReceived
public static long getBytesReceived()
-