Top Fields Constructors Methods
jdk.jfr.internal.consumer

public final Class OngoingStream

extends EventByteStream
Class Inheritance
Imports
java.io.IOException, java.nio.ByteBuffer, java.nio.file.Path, jdk.jfr.Recording, .RecordingState, jdk.jfr.internal.SecuritySupport, .SecuritySupport.SafePath, jdk.jfr.internal.management.EventByteStream, .ManagementSupport

Field Summary

Modifier and TypeField and Description
private final int
private static final byte[]
private final long
private boolean
private ChunkHeader
private static final int
private static final int
private final byte[]
private RecordingInput
private static final byte
private Path
private long
private final Recording
private final RepositoryFiles
private long
Inherited from jdk.jfr.internal.management.EventByteStream:
NAME

Constructor Summary

AccessConstructor and Description
public
OngoingStream(Recording recording, int blockSize, long startTimeNanos, long endTimeNanos)

Method Summary

Modifier and TypeMethod and Description
public synchronized void
close()

Implements java.io.Closeable.close.

Closes this stream and releases any system resources associated with it.
private void
private boolean
private boolean
private boolean
public synchronized byte[]
private byte[]
private byte[]
readBytes(int size)

private byte[]
readNonHeader(int size)

private byte[]
readWithHeader(int size)

private void
Inherited from jdk.jfr.internal.management.EventByteStream:
getIdgetLastTouchednewFinishedStreamnewOngoingStreamtouch

Field Detail

blockSizeback to summary
private final int blockSize
EMPTY_ARRAYback to summary
private static final byte[] EMPTY_ARRAY
endTimeNanosback to summary
private final long endTimeNanos
firstback to summary
private boolean first
HEADER_FILE_STATE_POSITIONback to summary
private static final int HEADER_FILE_STATE_POSITION
HEADER_SIZEback to summary
private static final int HEADER_SIZE
headerBytesback to summary
private final byte[] headerBytes
inputback to summary
private RecordingInput input
MODIFYING_STATEback to summary
private static final byte MODIFYING_STATE
pathback to summary
private Path path
positionback to summary
private long position
recordingback to summary
private final Recording recording
repositoryFilesback to summary
private final RepositoryFiles repositoryFiles
startTimeNanosback to summary
private long startTimeNanos

Constructor Detail

OngoingStreamback to summary
public OngoingStream(Recording recording, int blockSize, long startTimeNanos, long endTimeNanos)

Method Detail

closeback to summary
public synchronized void close() throws IOException

Implements java.io.Closeable.close.

Doc from java.io.Closeable.close.

Closes this stream and releases any system resources associated with it. If the stream is already closed then invoking this method has no effect.

As noted in AutoCloseable#close(), cases where the close may fail require careful attention. It is strongly advised to relinquish the underlying resources and to internally mark the Closeable as closed, prior to throwing the IOException.

Annotations
@Override
Exceptions
IOException:
if an I/O error occurs
closeInputback to summary
private void closeInput()
ensureInputback to summary
private boolean ensureInput() throws IOException
ensurePathback to summary
private boolean ensurePath()
isRecordingClosedback to summary
private boolean isRecordingClosed()
readback to summary
public synchronized byte[] read() throws IOException

Implements abstract jdk.jfr.internal.management.EventByteStream.read.

Annotations
@Override
readBytesback to summary
private byte[] readBytes() throws IOException
readBytesback to summary
private byte[] readBytes(int size) throws IOException
readNonHeaderback to summary
private byte[] readNonHeader(int size) throws IOException
readWithHeaderback to summary
private byte[] readWithHeader(int size) throws IOException
takeNapback to summary
private void takeNap() throws IOException