Top Description Inners Fields Constructors Methods
org.springframework.core.metrics.jfr

pack-priv Class FlightRecorderStartupStep

extends Object
implements StartupStep
Class Inheritance
All Implemented Interfaces
org.springframework.core.metrics.StartupStep
Imports
java.util.Iterator, java.util.function.Consumer, .Supplier, org.springframework.core.metrics.StartupStep, org.springframework.lang.NonNull

StartupStep implementation for the Java Flight Recorder.

This variant delegates to a JFR event extension to collect and record data in Java Flight Recorder.

Author
Brian Clozel

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class
pack-priv static class

Field Summary

Modifier and TypeField and Description
private final FlightRecorderStartupEvent
private final Consumer<FlightRecorderStartupStep>
private final FlightRecorderStartupStep.FlightRecorderTags

Constructor Summary

AccessConstructor and Description
public
FlightRecorderStartupStep(long id, String name, long parentId, Consumer<FlightRecorderStartupStep> recordingCallback)

Method Summary

Modifier and TypeMethod and Description
public void
end()

Implements org.springframework.core.metrics.StartupStep.end.

Record the state of the step and possibly other metrics like execution time.
protected FlightRecorderStartupEvent
public long
getId()

Implements org.springframework.core.metrics.StartupStep.getId.

Return the unique id for this step within the application startup.
public String
getName()

Implements org.springframework.core.metrics.StartupStep.getName.

Return the name of the startup step.
public Long
getParentId()

Implements org.springframework.core.metrics.StartupStep.getParentId.

Return, if available, the id of the parent step.
public StartupStep.Tags
getTags()

Implements org.springframework.core.metrics.StartupStep.getTags.

Return the Tag collection for this step.
public StartupStep
tag(String
tag key
key
,
String
tag value
value
)

Implements org.springframework.core.metrics.StartupStep.tag.

Add a Tag to the step.
public StartupStep
tag(String
tag key
key
,
Supplier<String>
Supplier for the tag value
value
)

Implements org.springframework.core.metrics.StartupStep.tag.

Add a Tag to the step.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

eventback to summary
private final FlightRecorderStartupEvent event
recordingCallbackback to summary
private final Consumer<FlightRecorderStartupStep> recordingCallback
tagsback to summary
private final FlightRecorderStartupStep.FlightRecorderTags tags

Constructor Detail

FlightRecorderStartupStepback to summary
public FlightRecorderStartupStep(long id, String name, long parentId, Consumer<FlightRecorderStartupStep> recordingCallback)

Method Detail

endback to summary
public void end()

Implements org.springframework.core.metrics.StartupStep.end.

Doc from org.springframework.core.metrics.StartupStep.end.

Record the state of the step and possibly other metrics like execution time.

Once ended, changes on the step state are not allowed.

Annotations
@Override
getEventback to summary
protected FlightRecorderStartupEvent getEvent()
getIdback to summary
public long getId()

Implements org.springframework.core.metrics.StartupStep.getId.

Doc from org.springframework.core.metrics.StartupStep.getId.

Return the unique id for this step within the application startup.

Annotations
@Override
getNameback to summary
public String getName()

Implements org.springframework.core.metrics.StartupStep.getName.

Doc from org.springframework.core.metrics.StartupStep.getName.

Return the name of the startup step.

A step name describes the current action or phase. This technical name should be "." namespaced and can be reused to describe other instances of similar steps during application startup.

Annotations
@Override
getParentIdback to summary
public Long getParentId()

Implements org.springframework.core.metrics.StartupStep.getParentId.

Doc from org.springframework.core.metrics.StartupStep.getParentId.

Return, if available, the id of the parent step.

The parent step is the step that was started the most recently when the current step was created.

Annotations
@Override
getTagsback to summary
public StartupStep.Tags getTags()

Implements org.springframework.core.metrics.StartupStep.getTags.

Doc from org.springframework.core.metrics.StartupStep.getTags.

Return the Tag collection for this step.

Annotations
@Override
tagback to summary
public StartupStep tag(String key, String value)

Implements org.springframework.core.metrics.StartupStep.tag.

Doc from org.springframework.core.metrics.StartupStep.tag.

Add a Tag to the step.

Parameters
key:String

tag key

value:String

tag value

Annotations
@Override
tagback to summary
public StartupStep tag(String key, Supplier<String> value)

Implements org.springframework.core.metrics.StartupStep.tag.

Doc from org.springframework.core.metrics.StartupStep.tag.

Add a Tag to the step.

Parameters
key:String

tag key

value:Supplier<String>

Supplier for the tag value

Annotations
@Override
org.springframework.core.metrics.jfr back to summary

pack-priv Class FlightRecorderStartupStep.FlightRecorderTag

extends Object
implements Tag
Class Inheritance
  • java.lang.Object
  • org.springframework.core.metrics.jfr.FlightRecorderStartupStep.FlightRecorderTag
All Implemented Interfaces
org.springframework.core.metrics.StartupStep.Tag

Field Summary

Modifier and TypeField and Description
private final String
private final String

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public String
public String
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

keyback to summary
private final String key
valueback to summary
private final String value

Constructor Detail

FlightRecorderTagback to summary
public FlightRecorderTag(String key, String value)

Method Detail

getKeyback to summary
public String getKey()

Implements org.springframework.core.metrics.StartupStep.Tag.getKey.

Doc from org.springframework.core.metrics.StartupStep.Tag.getKey.

Return the Tag name.

Annotations
@Override
getValueback to summary
public String getValue()

Implements org.springframework.core.metrics.StartupStep.Tag.getValue.

Doc from org.springframework.core.metrics.StartupStep.Tag.getValue.

Return the Tag value.

Annotations
@Override
org.springframework.core.metrics.jfr back to summary

pack-priv Class FlightRecorderStartupStep.FlightRecorderTags

extends Object
implements Tags
Class Inheritance
  • java.lang.Object
  • org.springframework.core.metrics.jfr.FlightRecorderStartupStep.FlightRecorderTags
All Implemented Interfaces
org.springframework.core.metrics.StartupStep.Tags, java.lang.Iterable

Nested and Inner Type Summary

Modifier and TypeClass and Description
private class

Field Summary

Modifier and TypeField and Description
private StartupStep.Tag[]

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public void
add(String key, String value)

public void
add(String key, Supplier<String> value)

public Iterator<StartupStep.Tag>
iterator()

Implements java.lang.Iterable.iterator.

Returns an iterator over elements of type T.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

tagsback to summary
private StartupStep.Tag[] tags

Constructor Detail

FlightRecorderTagsback to summary
pack-priv FlightRecorderTags()

Method Detail

addback to summary
public void add(String key, String value)
addback to summary
public void add(String key, Supplier<String> value)
iteratorback to summary
public Iterator<StartupStep.Tag> iterator()

Implements java.lang.Iterable.iterator.

Doc from java.lang.Iterable.iterator.

Returns an iterator over elements of type T.

Returns:Iterator<StartupStep.Tag>

an Iterator.

Annotations
@NonNull
@Override
org.springframework.core.metrics.jfr back to summary

private Class FlightRecorderStartupStep.FlightRecorderTags.TagsIterator

extends Object
implements Iterator<StartupStep.Tag>
Class Inheritance
  • java.lang.Object
  • org.springframework.core.metrics.jfr.FlightRecorderStartupStep.FlightRecorderTags.TagsIterator
All Implemented Interfaces
java.util.Iterator

Field Summary

Modifier and TypeField and Description
private int

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public boolean
hasNext()

Implements java.util.Iterator.hasNext.

Returns true if the iteration has more elements.
public StartupStep.Tag
next()

Implements java.util.Iterator.next.

Returns the next element in the iteration.
public void
remove()

Overrides default java.util.Iterator.remove.

Removes from the underlying collection the last element returned by this iterator (optional operation).
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

idxback to summary
private int idx

Constructor Detail

TagsIteratorback to summary
private TagsIterator()

Method Detail

hasNextback to summary
public boolean hasNext()

Implements java.util.Iterator.hasNext.

Doc from java.util.Iterator.hasNext.

Returns true if the iteration has more elements. (In other words, returns true if next would return an element rather than throwing an exception.)

Returns:boolean

true if the iteration has more elements

Annotations
@Override
nextback to summary
public StartupStep.Tag next()

Implements java.util.Iterator.next.

Doc from java.util.Iterator.next.

Returns the next element in the iteration.

Returns:StartupStep.Tag

the next element in the iteration

Annotations
@Override
removeback to summary
public void remove()

Overrides default java.util.Iterator.remove.

Doc from java.util.Iterator.remove.

Removes from the underlying collection the last element returned by this iterator (optional operation). This method can be called only once per call to next.

The behavior of an iterator is unspecified if the underlying collection is modified while the iteration is in progress in any way other than by calling this method, unless an overriding class has specified a concurrent modification policy.

The behavior of an iterator is unspecified if this method is called after a call to the forEachRemaining method.

Annotations
@Override