Package com.arpnetworking.utility
Class TimerTrigger
java.lang.Object
com.arpnetworking.utility.TimerTrigger
- All Implemented Interfaces:
Trigger
A
Trigger
that waits a set amount of time then fires.- Author:
- Brandon Arp (brandon dot arp at inscopemetrics dot io)
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionGenerate a Steno log compatible representation.toString()
void
waitOnFileNotFoundTrigger
(int attempt) Blocks the current thread.void
Blocks the current thread.
-
Constructor Details
-
TimerTrigger
Public constructor.- Parameters:
duration
- Wait time
-
-
Method Details
-
waitOnReadTrigger
Description copied from interface:Trigger
Blocks the current thread.- Specified by:
waitOnReadTrigger
in interfaceTrigger
- Throws:
InterruptedException
- thrown when the wait is interrupted.
-
waitOnFileNotFoundTrigger
Description copied from interface:Trigger
Blocks the current thread.- Specified by:
waitOnFileNotFoundTrigger
in interfaceTrigger
- Parameters:
attempt
- The attempt number to open or find the file. Used for exponential backoff.- Throws:
InterruptedException
- thrown when the wait is interrupted.
-
toLogValue
Generate a Steno log compatible representation.- Returns:
- Steno log compatible representation.
-
toString
-