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

public final Class QueryPrinter

extends Object
Class Inheritance
Imports
java.text.ParseException, java.util.ArrayList, .Collections, .Comparator, .HashMap, .List, .Map, jdk.jfr.AnnotationElement, .EventType, .Experimental, .Relational, .ValueDescriptor, jdk.jfr.consumer.EventStream, jdk.jfr.internal.util.Utils, .Columnizer, .Output, .StopWatch, .Tokenizer, .UserDataException, .UserSyntaxException, .ValueFormatter

Class responsible for executing and displaying the contents of a query.

Used by 'jcmd JFR.query' and 'jfr query'.

Field Summary

Modifier and TypeField and Description
private final Configuration
private final Output
private final StopWatch
private final EventStream

Constructor Summary

AccessConstructor and Description
public
QueryPrinter(Configuration
display configuration
configuration
,
EventStream
a non-started stream from where data should be fetched.
stream
)

Constructs a query printer.

Method Summary

Modifier and TypeMethod and Description
public void
execute(String
the query text
query
)

Prints the query.

public static String
private boolean
private void
private List<String>
private boolean
showEvents(String queryText)

private boolean
private void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

configurationback to summary
private final Configuration configuration
outback to summary
private final Output out
stopWatchback to summary
private final StopWatch stopWatch
streamback to summary
private final EventStream stream

Constructor Detail

QueryPrinterback to summary
public QueryPrinter(Configuration configuration, EventStream stream)

Constructs a query printer.

Parameters
configuration:Configuration

display configuration

stream:EventStream

a non-started stream from where data should be fetched.

Method Detail

executeback to summary
public void execute(String query) throws UserDataException, UserSyntaxException

Prints the query.

Parameters
query:String

the query text

Exceptions
UserDataException:
if the stream associated with the printer lacks event or event metadata
UserSyntaxException:
if the syntax of the query is incorrect.
See Also
getGrammarText().
getGrammarTextback to summary
public static String getGrammarText()
isExperimentalback to summary
private boolean isExperimental(EventType t)
printFieldsback to summary
private void printFields(EventType type, List<EventType> allTypes)
relationsback to summary
private List<String> relations(EventType type)
showEventsback to summary
private boolean showEvents(String queryText)
showFieldsback to summary
private boolean showFields(String text)
showQueryback to summary
private void showQuery(String query) throws UserDataException, UserSyntaxException