Skip to content

Commit

Permalink
rename method
Browse files Browse the repository at this point in the history
  • Loading branch information
martijnvg committed Jun 5, 2018
1 parent 92737df commit c21a408
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion libs/grok/src/main/java/org/elasticsearch/grok/Grok.java
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ public Map<String, Object> captures(String text) {
}
if (result == Matcher.INTERRUPTED) {
throw new RuntimeException("grok pattern matching was interrupted after [" +
threadWatchdog.maxExecutionTime() + "] ms");
threadWatchdog.maxExecutionTimeInMillis() + "] ms");
} else if (result == Matcher.FAILED) {
// TODO: I think we should throw an error here?
return null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ public interface ThreadWatchdog {
void register();

/**
* @return The maximum allowed time for a thread to invoke {@link #unregister()} after {@link #register()}
* has been invoked before this ThreadWatchDog starts to interrupting that thread.
* @return The maximum allowed time in milliseconds for a thread to invoke {@link #unregister()}
* after {@link #register()} has been invoked before this ThreadWatchDog starts to interrupting that thread.
*/
long maxExecutionTime();
long maxExecutionTimeInMillis();

/**
* Unregisters the current thread and prevents it from being interrupted.
Expand Down Expand Up @@ -89,7 +89,7 @@ public void register() {
}

@Override
public long maxExecutionTime() {
public long maxExecutionTimeInMillis() {
return Long.MAX_VALUE;
}

Expand Down Expand Up @@ -123,7 +123,7 @@ public void register() {
}

@Override
public long maxExecutionTime() {
public long maxExecutionTimeInMillis() {
return maxExecutionTime;
}

Expand Down

0 comments on commit c21a408

Please sign in to comment.