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

pack-priv abstract Class PeriodicTask

extends Object
Class Inheritance
Known Direct Subclasses
jdk.jfr.internal.periodic.EventTask, jdk.jfr.internal.periodic.FlushTask
Imports
jdk.jfr.internal.LogLevel, .LogTag, .Logger

Base class that holds time related information for a periodic task.

Class hierarchy for periodic tasks:

              PeriodicTask
               /        \
              /          \
         EventTask    FlushTask
          /     \
         /       \
JVMEventTask   JavaEventTask

State modifications should only be done from the periodic task thread.

Field Summary

Modifier and TypeField and Description
private Batch
private long
private final LookupKey
private final String
private long

Constructor Summary

AccessConstructor and Description
public
PeriodicTask(LookupKey lookupKey, String name)

Method Summary

Modifier and TypeMethod and Description
public abstract void
execute(long timestamp, PeriodicType periodicType)

protected abstract long
public Batch
public final LookupKey
public final String
public final long
public abstract boolean
private void
logChunk(PeriodicType periodicType)

private void
logInterval(boolean trace, String action)

public final void
run(long timestamp, PeriodicType periodicType)

public void
setBatch(Batch batch)

public final boolean
public final void
tick()

public final void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

batchback to summary
private Batch batch
counterback to summary
private long counter
lookupKeyback to summary
private final LookupKey lookupKey
nameback to summary
private final String name
periodback to summary
private long period

Constructor Detail

PeriodicTaskback to summary
public PeriodicTask(LookupKey lookupKey, String name)

Method Detail

executeback to summary
public abstract void execute(long timestamp, PeriodicType periodicType)
fetchPeriodback to summary
protected abstract long fetchPeriod()
getBatchback to summary
public Batch getBatch()
getLookupKeyback to summary
public final LookupKey getLookupKey()
getNameback to summary
public final String getName()
getPeriodback to summary
public final long getPeriod()
isSchedulableback to summary
public abstract boolean isSchedulable()
logChunkback to summary
private void logChunk(PeriodicType periodicType)
logIntervalback to summary
private void logInterval(boolean trace, String action)
runback to summary
public final void run(long timestamp, PeriodicType periodicType)
setBatchback to summary
public void setBatch(Batch batch)
shouldRunback to summary
public final boolean shouldRun()
tickback to summary
public final void tick()
updatePeriodback to summary
public final void updatePeriod()