public class ClientTransactionCompletion extends java.lang.Object implements TransactionCompletion
Constructor and Description |
---|
ClientTransactionCompletion(boolean backoff,
int dataPacketsTransferred,
long bytesTransferred,
long durationNanos) |
Modifier and Type | Method and Description |
---|---|
long |
getBytesTransferred() |
int |
getDataPacketsTransferred() |
long |
getDuration(java.util.concurrent.TimeUnit timeUnit) |
boolean |
isBackoff()
When a sending to a NiFi instance, the server may accept the content sent
to it but indicate that its queues are full and that the client should
backoff sending data for a bit.
|
public ClientTransactionCompletion(boolean backoff, int dataPacketsTransferred, long bytesTransferred, long durationNanos)
public boolean isBackoff()
TransactionCompletion
isBackoff
in interface TransactionCompletion
true
if the server did in fact request that,
false
otherwisepublic int getDataPacketsTransferred()
getDataPacketsTransferred
in interface TransactionCompletion
public long getBytesTransferred()
getBytesTransferred
in interface TransactionCompletion
InputStream
of the
DataPacket
public long getDuration(java.util.concurrent.TimeUnit timeUnit)
getDuration
in interface TransactionCompletion
timeUnit
- unit of time for which to report the duration