core/src/main/java/com/digitalpebble/stormcrawler/persistence/AbstractQueryingSpout.java
private long throttleQueries() {
        if (timeLastQuerySent != 0) {
            // check that we allowed some time between queries
            long difference = System.currentTimeMillis() - timeLastQuerySent;
            if (difference < minDelayBetweenQueries) {
                return minDelayBetweenQueries - difference;
            }
        }
        return -1;
    }
private long throttleQueries() {
        if (timeLastQuerySent != 0) {
            // check that we allowed some time between queries
            long difference = System.currentTimeMillis() - timeLastQuerySent;
            if (difference < minDelayBetweenQueries) {
                return minDelayBetweenQueries - difference;
            }
        }
        return -1;
    }
private long throttleQueries ( ) { if ( timeLastQuerySent != 0 ) { // check that we allowed some time between queries long difference = System . currentTimeMillis ( ) - timeLastQuerySent ; if ( difference < minDelayBetweenQueries ) { return minDelayBetweenQueries - difference ; } } return - 1 ; }
Returns the amount of time to wait if the backend was queried too
recently and needs throttling or -1 if the backend can be queried
straight away.
Returns the amount of time to wait if the backend was queried too recently and needs throttling or - 1 if the backend can be queried straight away .