java.lang.Object
org.elasticsearch.grok.MatcherWatchdog.Noop
- All Implemented Interfaces:
MatcherWatchdog
- Enclosing interface:
- MatcherWatchdog
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.grok.MatcherWatchdog
MatcherWatchdog.Default, MatcherWatchdog.Noop -
Method Summary
Modifier and TypeMethodDescriptionlongvoidregister(org.joni.Matcher matcher) Registers the current matcher and interrupts the this matcher if the takes too long for this thread to invokeMatcherWatchdog.unregister(Matcher).voidunregister(org.joni.Matcher matcher) Unregisters the current matcher and prevents it from being interrupted.
-
Method Details
-
register
public void register(org.joni.Matcher matcher) Description copied from interface:MatcherWatchdogRegisters the current matcher and interrupts the this matcher if the takes too long for this thread to invokeMatcherWatchdog.unregister(Matcher).- Specified by:
registerin interfaceMatcherWatchdog- Parameters:
matcher- The matcher to register
-
maxExecutionTimeInMillis
public long maxExecutionTimeInMillis()- Specified by:
maxExecutionTimeInMillisin interfaceMatcherWatchdog- Returns:
- The maximum allowed time in milliseconds for a thread to invoke
MatcherWatchdog.unregister(Matcher)afterMatcherWatchdog.register(Matcher)has been invoked before this ThreadWatchDog starts to interrupting that thread.
-
unregister
public void unregister(org.joni.Matcher matcher) Description copied from interface:MatcherWatchdogUnregisters the current matcher and prevents it from being interrupted.- Specified by:
unregisterin interfaceMatcherWatchdog- Parameters:
matcher- The matcher to unregister
-