@Override public boolean isTimedOut() { if ( timeout == null ) { return false; } if ( timedOut ) { return true; } return isTimedOut( System.nanoTime() ); }
@Override public boolean isTimedOut() { if ( timeout == null ) { return false; } if ( timedOut ) { return true; } return isTimedOut( System.nanoTime() ); }
private Long getTimeoutLeft(long factor) { if ( timeout == null ) { return null; } else { final long currentTime = System.nanoTime(); if ( isTimedOut( currentTime ) ) { //0 means no limit so we return the lowest possible value return 0l; } long left = timeout - ( currentTime - start); long result; if ( left % factor == 0 ) { result = left / factor; } else { result = (left / factor) + 1; } if ( result <= 0 ) { //0 means no limit so we return the lowest possible value return 0l; } else { return result; } } }
private Long getTimeoutLeft(long factor) { if ( timeout == null ) { return null; } else { final long currentTime = System.nanoTime(); if ( isTimedOut( currentTime ) ) { //0 means no limit so we return the lowest possible value return 0L; } long left = timeout - ( currentTime - start); long result; if ( left % factor == 0 ) { result = left / factor; } else { result = (left / factor) + 1; } if ( result <= 0 ) { //0 means no limit so we return the lowest possible value return 0L; } else { return result; } } }
public Explanation explain(int index) throws IOException { final Explanation explanation = searcher.explain( filters, docId( index ) ); timeoutManager.isTimedOut(); return explanation; }
public Explanation explain(int index) throws IOException { final Explanation explanation = searcher.explain( filters, docId( index ) ); timeoutManager.isTimedOut(); return explanation; }
private boolean isImmediateTimeout() { boolean timeoutAt0 = false; if ( timeoutManager.getType() == TimeoutManager.Type.LIMIT ) { final Long timeoutLeft = timeoutManager.getTimeoutLeftInMilliseconds(); if ( timeoutLeft != null ) { if ( timeoutLeft == 0L ) { if ( timeoutManager.isTimedOut() ) { timeoutManager.forceTimedOut(); timeoutAt0 = true; } } } else { if ( timeoutManager.isTimedOut() ) { timeoutManager.forceTimedOut(); } } } return timeoutAt0; }
private boolean isImmediateTimeout() { boolean timeoutAt0 = false; if ( timeoutManager.getType() == TimeoutManager.Type.LIMIT ) { final Long timeoutLeft = timeoutManager.getTimeoutLeftInMilliseconds(); if ( timeoutLeft != null ) { if ( timeoutLeft == 0l ) { if ( timeoutManager.isTimedOut() ) { timeoutManager.forceTimedOut(); timeoutAt0 = true; } } } else { if ( timeoutManager.isTimedOut() ) { timeoutManager.forceTimedOut(); } } } return timeoutAt0; }
getTimeoutManager().isTimedOut();
getTimeoutManager().isTimedOut();
updateFacets(); timeoutManager.isTimedOut();
this.totalHits = hitCountCollector.getTotalHits(); timeoutManager.isTimedOut();