public final class CompilationAlarm extends Object implements AutoCloseable
| Modifier and Type | Class and Description |
|---|---|
static class |
CompilationAlarm.Options |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
static CompilationAlarm |
current()
Gets the current compilation alarm.
|
boolean |
hasExpired()
Determines if this alarm has expired.
|
static CompilationAlarm |
trackCompilationPeriod(OptionValues options)
Starts an alarm for setting a time limit on a compilation if there isn't already an active
alarm and
CompilationAlarm.Options.CompilationExpirationPeriod> 0. |
public static CompilationAlarm current()
false for CompilationAlarm.hasExpired().public boolean hasExpired()
true if the current compilation already takes longer than
CompilationAlarm.Options.CompilationExpirationPeriod, false
otherwisepublic void close()
close in interface AutoCloseablepublic static CompilationAlarm trackCompilationPeriod(OptionValues options)
CompilationAlarm.Options.CompilationExpirationPeriod> 0. The
returned value can be used in a try-with-resource statement to disable the alarm once the
compilation is finished.CompilationAlarm if there was no current alarm for the calling thread
before this call otherwise null