@InterfaceAudience.Private @InterfaceStability.Unstable public final class S3AInstrumentation.InputStreamStatistics extends Object implements AutoCloseable
| Modifier and Type | Field and Description |
|---|---|
long |
aborted |
long |
backwardSeekOperations |
long |
bytesBackwardsOnSeek |
long |
bytesDiscardedInAbort |
long |
bytesRead |
long |
bytesReadInClose |
long |
bytesSkippedOnSeek |
long |
closed |
long |
closeOperations |
long |
forwardSeekOperations |
long |
inputPolicy |
long |
openOperations |
long |
policySetCount |
long |
readExceptions |
long |
readFullyOperations |
long |
readOperations |
long |
readsIncomplete |
long |
seekOperations |
| Modifier and Type | Method and Description |
|---|---|
void |
bytesRead(long bytes)
Increment the bytes read counter by the number of bytes;
no-op if the argument is negative.
|
void |
close()
Close triggers the merge of statistics into the filesystem's
instrumentation instance.
|
AtomicLong |
getVersionMismatchCounter()
Get a reference to the version mismatch counter.
|
void |
inputPolicySet(int updatedPolicy)
The input policy has been switched.
|
void |
readException()
An ignored stream read exception was received.
|
void |
readFullyOperationStarted(long pos,
long len)
A
PositionedRead.read(position, buffer, offset, length)
operation has just started. |
void |
readOperationCompleted(int requested,
int actual)
A read operation has completed.
|
void |
readOperationStarted(long pos,
long len)
A
read(byte[] buf, int off, int len) operation has started. |
void |
seekBackwards(long negativeOffset)
Seek backwards, incrementing the seek and backward seek counters.
|
void |
seekForwards(long skipped)
Record a forward seek, adding a seek operation, a forward
seek operation, and any bytes skipped.
|
void |
streamClose(boolean abortedConnection,
long remainingInCurrentRequest)
The inner stream was closed.
|
long |
streamOpened()
The inner stream was opened.
|
String |
toString()
String operator describes all the current statistics.
|
public long openOperations
public long closeOperations
public long closed
public long aborted
public long seekOperations
public long readExceptions
public long forwardSeekOperations
public long backwardSeekOperations
public long bytesRead
public long bytesSkippedOnSeek
public long bytesBackwardsOnSeek
public long readOperations
public long readFullyOperations
public long readsIncomplete
public long bytesReadInClose
public long bytesDiscardedInAbort
public long policySetCount
public long inputPolicy
public void seekBackwards(long negativeOffset)
negativeOffset - how far was the seek?
This is expected to be negative.public void seekForwards(long skipped)
skipped - number of bytes skipped by reading from the stream.
If the seek was implemented by a close + reopen, set this to zero.public long streamOpened()
public void streamClose(boolean abortedConnection,
long remainingInCurrentRequest)
abortedConnection - flag to indicate the stream was aborted,
rather than closed cleanlyremainingInCurrentRequest - the number of bytes remaining in
the current request.public void readException()
public void bytesRead(long bytes)
bytes - number of bytes readpublic void readOperationStarted(long pos,
long len)
read(byte[] buf, int off, int len) operation has started.pos - starting position of the readlen - length of bytes to readpublic void readFullyOperationStarted(long pos,
long len)
PositionedRead.read(position, buffer, offset, length)
operation has just started.pos - starting position of the readlen - length of bytes to readpublic void readOperationCompleted(int requested,
int actual)
requested - number of requested bytesactual - the actual number of bytespublic void close()
close in interface AutoCloseablepublic void inputPolicySet(int updatedPolicy)
updatedPolicy - enum value of new policy.public AtomicLong getVersionMismatchCounter()
Copyright © 2008–2021 Apache Software Foundation. All rights reserved.