P - the peripheral type the event is defined for.B - the I/O buffer type.public class RoundCompletionEvent<P extends Peripheral<? super P>,B extends java.nio.Buffer> extends PeripheralEvent<P>
RoundCompletionEvent class encapsulates the completion condition of a round of I/O operation. InputRoundListener,
OutputRoundListenercount, lastTimeStamp, lastTimeStampMicros, peripheral, timeStamp, timeStampMicros| Constructor and Description |
|---|
RoundCompletionEvent(P peripheral,
B buffer,
int number)
Creates a new
RoundCompletionEvent with the specified I/O buffer and time-stamped with the current time. |
RoundCompletionEvent(P peripheral,
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, getLastTimeStamp, getLastTimeStampMicros, getPeripheral, getTimeStamp, getTimeStampMicrospublic RoundCompletionEvent(P peripheral, B buffer, int number)
RoundCompletionEvent with the specified I/O buffer and time-stamped with the current time.peripheral - the source peripheral.buffer - the input or output buffer.number - the number of elements input or output during the round.java.lang.NullPointerException - if peripheral or buffer is null.java.lang.IllegalArgumentException - if number is negative.public RoundCompletionEvent(P peripheral, B buffer, int number, long timeStamp, int timeStampMicros)
RoundCompletionEvent with the specified I/O buffer and timestamp.peripheral - the source peripheral.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 peripheral 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, 2013, Oracle and/or its affiliates. All rights reserved.
Legal Notices