Package io.fusionauth.http.server.io
Class Throughput
java.lang.Object
io.fusionauth.http.server.io.Throughput
This class allows the
HTTPWorker to hook into other classes without passing around interfaces, loggers, and configuration.- Author:
- Brian Pontarelli
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlonglastUsed()voidread(long numberOfBytes) Signals that some number of bytes were read from a client.longreadThroughput(long now) longwriteThroughput(long now) voidwrote(long numberOfBytes) Signals that some number of bytes were wrote to a client.
-
Constructor Details
-
Throughput
public Throughput(long readThroughputDelay, long writeThroughputDelay)
-
-
Method Details
-
lastUsed
public long lastUsed() -
read
public void read(long numberOfBytes) Signals that some number of bytes were read from a client.- Parameters:
numberOfBytes- The number of bytes.
-
readThroughput
public long readThroughput(long now) -
writeThroughput
public long writeThroughput(long now) -
wrote
public void wrote(long numberOfBytes) Signals that some number of bytes were wrote to a client.- Parameters:
numberOfBytes- The number of bytes.
-