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 TypeMethodDescriptionlong
void
register
(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)
.void
unregister
(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:MatcherWatchdog
Registers the current matcher and interrupts the this matcher if the takes too long for this thread to invokeMatcherWatchdog.unregister(Matcher)
.- Specified by:
register
in interfaceMatcherWatchdog
- Parameters:
matcher
- The matcher to register
-
maxExecutionTimeInMillis
public long maxExecutionTimeInMillis()- Specified by:
maxExecutionTimeInMillis
in 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:MatcherWatchdog
Unregisters the current matcher and prevents it from being interrupted.- Specified by:
unregister
in interfaceMatcherWatchdog
- Parameters:
matcher
- The matcher to unregister
-