APIdia Launch Partner
Top Description Inners Fields Constructors Methods
jdk.jfr.internal.consumer

public final Class ChunkParser

extends Object
Class Inheritance
Imports
java.io.IOException, java.util.Collection, .Collections, .List, .StringJoiner, jdk.jfr.EventType, jdk.jfr.consumer.RecordedEvent, .RecordedObject, jdk.jfr.internal.LogLevel, .LogTag, .Logger, .LongMap, .MetadataDescriptor, .Type, jdk.jfr.internal.util.Utils, jdk.jfr.internal.consumer.filter.CheckpointEvent, .ChunkWriter

Parses a chunk.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static enum
public static record

Field Summary

Modifier and TypeField and Description
private boolean
private final ChunkHeader
private ChunkParser.ParserConfiguration
private static final long
private final LongMap<ConstantLookup>
public static final RecordedEvent
private final RecordingInput
private long
private MetadataDescriptor
private LongMap<Parser>
private final ParserState
private MetadataDescriptor
private boolean
private final TimeConverter
private LongMap<Type>

Constructor Summary

AccessConstructor and Description
public
public
private
private

Method Summary

Modifier and TypeMethod and Description
private boolean
awaitUpdatedHeader(long absoluteChunkEnd, long filterEnd)

public void
private void
fillConstantPools(long abortCP)

public long
public long
public List<EventType>
public ChunkHeader
public long
private String
getName(long id)

public List<EventType>
public long
public Collection<Type>
public boolean
public boolean
public boolean
public boolean
private void
logConstant(long key, Object v, boolean preresolved)

public ChunkParser
public ChunkParser
private boolean
public RecordedEvent
readEvent()

Reads an event and returns null when the chunk ends

pack-priv RecordedEvent
readStreamingEvent()

Reads an event and returns null when segment or chunk ends.

public void
public void
setStaleMetadata(boolean stale)

private String
private String
private void
pack-priv void
updateConfiguration(ChunkParser.ParserConfiguration configuration, boolean resetEventCache)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

chunkFinishedback to summary
private boolean chunkFinished
chunkHeaderback to summary
private final ChunkHeader chunkHeader
configurationback to summary
private ChunkParser.ParserConfiguration configuration
CONSTANT_POOL_TYPE_IDback to summary
private static final long CONSTANT_POOL_TYPE_ID
constantLookupsback to summary
private final LongMap<ConstantLookup> constantLookups
FLUSH_MARKERback to summary
public static final RecordedEvent FLUSH_MARKER
inputback to summary
private final RecordingInput input
lastFlushback to summary
private long lastFlush
metadataback to summary
private MetadataDescriptor metadata
parsersback to summary
private LongMap<Parser> parsers
parserStateback to summary
private final ParserState parserState
previousMetadataback to summary
private MetadataDescriptor previousMetadata
staleMetadataback to summary
private boolean staleMetadata
timeConverterback to summary
private final TimeConverter timeConverter
typeMapback to summary
private LongMap<Type> typeMap

Constructor Detail

ChunkParserback to summary
public ChunkParser(RecordingInput input, ParserState ps) throws IOException
ChunkParserback to summary
public ChunkParser(RecordingInput input, ChunkParser.ParserConfiguration pc, ParserState ps) throws IOException
ChunkParserback to summary
private ChunkParser(ChunkParser previous, ParserState ps) throws IOException
ChunkParserback to summary
private ChunkParser(ChunkHeader header, ChunkParser previous, ChunkParser.ParserConfiguration pc, ParserState ps) throws IOException

Method Detail

awaitUpdatedHeaderback to summary
private boolean awaitUpdatedHeader(long absoluteChunkEnd, long filterEnd) throws IOException
closeback to summary
public void close()
fillConstantPoolsback to summary
private void fillConstantPools(long abortCP) throws IOException
getChunkDurationback to summary
public long getChunkDuration()
getEndNanosback to summary
public long getEndNanos()
getEventTypesback to summary
public List<EventType> getEventTypes()
getHeaderback to summary
public ChunkHeader getHeader()
getLastFlushback to summary
public long getLastFlush()
getNameback to summary
private String getName(long id)
getPreviousEventTypesback to summary
public List<EventType> getPreviousEventTypes()
getStartNanosback to summary
public long getStartNanos()
getTypesback to summary
public Collection<Type> getTypes()
hasStaleMetadataback to summary
public boolean hasStaleMetadata()
isChunkFinishedback to summary
public boolean isChunkFinished()
isFinalChunkback to summary
public boolean isFinalChunk()
isLastChunkback to summary
public boolean isLastChunk() throws IOException
logConstantback to summary
private void logConstant(long key, Object v, boolean preresolved)
newChunkParserback to summary
public ChunkParser newChunkParser() throws IOException
nextChunkParserback to summary
public ChunkParser nextChunkParser() throws IOException
parseFlushCheckpointback to summary
private boolean parseFlushCheckpoint() throws IOException
readEventback to summary
public RecordedEvent readEvent() throws IOException

Reads an event and returns null when the chunk ends

readStreamingEventback to summary
pack-priv RecordedEvent readStreamingEvent() throws IOException

Reads an event and returns null when segment or chunk ends.

resetCacheback to summary
public void resetCache()
setStaleMetadataback to summary
public void setStaleMetadata(boolean stale)
textifyback to summary
private String textify(Object o)
textifyArrayback to summary
private String textifyArray(Object[] array)
updateConfigurationback to summary
private void updateConfiguration()
updateConfigurationback to summary
pack-priv void updateConfiguration(ChunkParser.ParserConfiguration configuration, boolean resetEventCache)
jdk.jfr.internal.consumer back to summary

private final Enum ChunkParser.CheckpointType

extends Enum<ChunkParser.CheckpointType>
Class Inheritance

Field Summary

Modifier and TypeField and Description
public static final ChunkParser.CheckpointType
public static final ChunkParser.CheckpointType
private final int
public static final ChunkParser.CheckpointType
public static final ChunkParser.CheckpointType

Constructor Summary

AccessConstructor and Description
private
CheckpointType(int mask)

Method Summary

Modifier and TypeMethod and Description
private boolean
is(int flags)

public static ChunkParser.CheckpointType
public static ChunkParser.CheckpointType[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

CHUNK_HEADERback to summary
public static final ChunkParser.CheckpointType CHUNK_HEADER
FLUSHback to summary
public static final ChunkParser.CheckpointType FLUSH
maskback to summary
private final int mask
STATICSback to summary
public static final ChunkParser.CheckpointType STATICS
THREADback to summary
public static final ChunkParser.CheckpointType THREAD

Constructor Detail

CheckpointTypeback to summary
private CheckpointType(int mask)

Method Detail

isback to summary
private boolean is(int flags)
valueOfback to summary
public static ChunkParser.CheckpointType valueOf(String name)
valuesback to summary
public static ChunkParser.CheckpointType[] values()
jdk.jfr.internal.consumer back to summary

public final Record ChunkParser.ParserConfiguration

extends Record
Class Inheritance
Record Components
filterStart:long 
filterEnd:long 
reuse:boolean 
ordered:boolean 
filter:ParserFilter 
chunkWriter:ChunkWriter 

Field Summary

Modifier and TypeField and Description
private final ChunkWriter
chunkWriter

Record Component accessed by chunkWriter().

private final ParserFilter
filter

Record Component accessed by filter().

private final long
filterEnd

Record Component accessed by filterEnd().

private final long
filterStart

Record Component accessed by filterStart().

private final boolean
ordered

Record Component accessed by ordered().

private final boolean
reuse

Record Component accessed by reuse().

Constructor Summary

AccessConstructor and Description
public
public
ParserConfiguration(long filterStart, long filterEnd, boolean reuse, boolean ordered, ParserFilter filter, ChunkWriter chunkWriter)

Method Summary

Modifier and TypeMethod and Description
public ChunkWriter
chunkWriter()

Record Component getter of chunkWriter.

public final boolean
equals(Object o)

Implements abstract java.lang.Record.equals.

Indicates whether some other object is "equal to" this one.

public ParserFilter
filter()

Record Component getter of filter.

public long
filterEnd()

Record Component getter of filterEnd.

public long
filterStart()

Record Component getter of filterStart.

public final int
hashCode()

Implements abstract java.lang.Record.hashCode.

Returns a hash code value for the record.

public boolean
ordered()

Record Component getter of ordered.

public boolean
reuse()

Record Component getter of reuse.

public final String
toString()

Implements abstract java.lang.Record.toString.

Returns a string representation of the record.

pack-priv ChunkParser.ParserConfiguration
withRange(long filterStart, long filterEnd)

Field Detail

chunkWriterback to summary
private final ChunkWriter chunkWriter

Record Component accessed by chunkWriter().

filterback to summary
private final ParserFilter filter

Record Component accessed by filter().

filterEndback to summary
private final long filterEnd

Record Component accessed by filterEnd().

filterStartback to summary
private final long filterStart

Record Component accessed by filterStart().

orderedback to summary
private final boolean ordered

Record Component accessed by ordered().

reuseback to summary
private final boolean reuse

Record Component accessed by reuse().

Constructor Detail

ParserConfigurationback to summary
public ParserConfiguration()
ParserConfigurationback to summary
public ParserConfiguration(long filterStart, long filterEnd, boolean reuse, boolean ordered, ParserFilter filter, ChunkWriter chunkWriter)

Method Detail

chunkWriterback to summary
public ChunkWriter chunkWriter()

Record Component getter of chunkWriter.

equalsback to summary
public final boolean equals(Object o)

Implements abstract java.lang.Record.equals.

Doc from java.lang.Record.equals.

Indicates whether some other object is "equal to" this one. In addition to the general contract of Object.equals, record classes must further obey the invariant that when a record instance is "copied" by passing the result of the record component accessor methods to the canonical constructor, as follows:

    R copy = new R(r.c1(), r.c2(), ..., r.cn());
then it must be the case that r.equals(copy).
filterback to summary
public ParserFilter filter()

Record Component getter of filter.

filterEndback to summary
public long filterEnd()

Record Component getter of filterEnd.

filterStartback to summary
public long filterStart()

Record Component getter of filterStart.

hashCodeback to summary
public final int hashCode()

Implements abstract java.lang.Record.hashCode.

Doc from java.lang.Record.hashCode.

Returns a hash code value for the record. Obeys the general contract of Object.hashCode. For records, hashing behavior is constrained by the refined contract of Record.equals, so that any two records created from the same components must have the same hash code.

orderedback to summary
public boolean ordered()

Record Component getter of ordered.

reuseback to summary
public boolean reuse()

Record Component getter of reuse.

toStringback to summary
public final String toString()

Implements abstract java.lang.Record.toString.

Doc from java.lang.Record.toString.

Returns a string representation of the record. In accordance with the general contract of Object#toString(), the toString method returns a string that "textually represents" this record. The result should be a concise but informative representation that is easy for a person to read.

In addition to this general contract, record classes must further participate in the invariant that any two records which are equal must produce equal strings. This invariant is necessarily relaxed in the rare case where corresponding equal component values might fail to produce equal strings for themselves.

withRangeback to summary
pack-priv ChunkParser.ParserConfiguration withRange(long filterStart, long filterEnd)