Skip to content

Commit

Permalink
HSEARCH-981 minor javadoc changes
Browse files Browse the repository at this point in the history
  • Loading branch information
hferentschik committed Jan 5, 2012
1 parent 9b9e67c commit e75e222
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 13 deletions.
Expand Up @@ -36,14 +36,11 @@ public final class DefaultTimingSource implements TimingSource {

private static final long INVALID_TIME = -1;

//lazily initialize it, so we don't start a thread for who doesn't use timeouts
//lazily initialize it, so we don't start a thread for those who don't use timeouts
//guarded by synchronization on this
private Timer timer = null;
private volatile long currentTimeApproximation = INVALID_TIME;

/* (non-Javadoc)
* @see org.hibernate.search.engine.spi.TimingSource#getMonotonicTimeEstimate()
*/
@Override
public long getMonotonicTimeEstimate() {
// This method is very performance critical:
Expand All @@ -58,9 +55,6 @@ public long getMonotonicTimeEstimate() {
return currentValue;
}

/* (non-Javadoc)
* @see org.hibernate.search.engine.spi.TimingSource#ensureInitialized()
*/
@Override
public synchronized void ensureInitialized() {
if ( timer == null ) {
Expand All @@ -70,9 +64,6 @@ public synchronized void ensureInitialized() {
}
}

/* (non-Javadoc)
* @see org.hibernate.search.engine.spi.TimingSource#stop()
*/
@Override
public synchronized void stop() {
if ( timer != null ) {
Expand Down
Expand Up @@ -20,9 +20,9 @@
*/
package org.hibernate.search.engine.spi;

import org.apache.lucene.util.Counter;
import org.apache.lucene.search.TimeLimitingCollector;
import org.apache.lucene.search.Collector;
import org.apache.lucene.search.TimeLimitingCollector;
import org.apache.lucene.util.Counter;

/**
* Lucene delegates responsibility for efficient time tracking to an external service;
Expand All @@ -37,7 +37,8 @@ public interface TimingSource {
/**
* Returns and approximation of {@link System#nanoTime()}.
* Performance should be preferred over accuracy by the implementation, but the value is monotonic
* and expresses time in milliseconds. So subsequent invocations could return the same value.
* and expresses time in milliseconds, however, subsequent invocations could return the same value.
*
* @return an increasing value related to time in milliseconds. Only meaningful to compare time intervals, with no guarantees of high precision.
*/
long getMonotonicTimeEstimate();
Expand Down

0 comments on commit e75e222

Please sign in to comment.