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.StreamSourceConduitImplementation ofStreamSourceConduitwrapping that wraps around byte-transferring methods to calculate total number of bytes transferred leveragingLongAdder.- Since:
- 8.0
- Author:
- Radoslav Husar
-
-
Constructor Summary
Constructors Constructor Description BytesReceivedStreamSourceConduit(org.xnio.conduits.StreamSourceConduit next)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static longgetBytesReceived()intread(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, wakeupReads
-
-
-
-
Method Detail
-
transferTo
public long transferTo(long position, long count, FileChannel target) throws IOException- 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
public int read(ByteBuffer dst) throws IOException
- Specified by:
readin interfaceorg.xnio.conduits.StreamSourceConduit- Throws:
IOException
-
read
public long read(ByteBuffer[] dsts, int offs, int len) throws IOException
- Specified by:
readin interfaceorg.xnio.conduits.StreamSourceConduit- Throws:
IOException
-
getBytesReceived
public static long getBytesReceived()
-
-