P - the device type the event is defined for.B - the I/O buffer type.public class RoundCompletionEvent<P extends Device<? super P>,B extends java.nio.Buffer> extends DeviceEvent<P>
RoundCompletionEvent class encapsulates the completion condition of a round of I/O
operation. InputRoundListener,
OutputRoundListenercount, device, lastTimeStamp, lastTimeStampMicros, timeStamp, timeStampMicros| Constructor and Description |
|---|
RoundCompletionEvent(P device,
B buffer,
int number)
Creates a new
RoundCompletionEvent with the specified I/O buffer and time-stamped
with the current time. |
RoundCompletionEvent(P device,
B buffer,
int number,
long timeStamp,
int timeStampMicros)
Creates a new
RoundCompletionEvent with the specified I/O buffer and timestamp. |
| Modifier and Type | Method and Description |
|---|---|
B |
getBuffer()
Returns the input or output buffer.
|
int |
getNumber()
Return the number of elements input or output during the round.
|
boolean |
isOnError()
Indicates whether an input buffer overrun or output buffer underrun condition occurred and
the I/O operation had to be suspended temporarily.
|
getCount, getDevice, getLastTimeStamp, getLastTimeStampMicros, getTimeStamp, getTimeStampMicrospublic RoundCompletionEvent(P device, B buffer, int number)
RoundCompletionEvent with the specified I/O buffer and time-stamped
with the current time.device - the source device.buffer - the input or output buffer.number - the number of elements input or output during the round.java.lang.NullPointerException - if device or buffer is null.java.lang.IllegalArgumentException - if number is negative.public RoundCompletionEvent(P device, B buffer, int number, long timeStamp, int timeStampMicros)
RoundCompletionEvent with the specified I/O buffer and timestamp.device - the source device.buffer - the I/O buffer.number - the number of elements input or output during the round.timeStamp - the timestamp (in milliseconds).timeStampMicros - the additional microseconds to the timestamp.java.lang.NullPointerException - if device or buffer is null.java.lang.IllegalArgumentException - if timeStamp, timeStampMicros or number is negative.public B getBuffer()
public int getNumber()
public boolean isOnError()
true if an input buffer overrun or output buffer underrun condition occurred.Copyright © 2012, 2014, Oracle and/or its affiliates. All rights reserved.
Legal Notices