Skip to content

Commit 0cc487e

Browse files
author
Vladimir Kotal
committed
fix comments per @ahornace
1 parent 0d8a6e7 commit 0cc487e

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

suggester/src/main/java/org/opengrok/suggest/Suggester.java

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,12 @@ public void init(final Collection<NamedIndexDir> luceneIndexes) {
173173
}
174174
}
175175

176+
/**
177+
* wait for initialization to finish.
178+
* @param timeout timeout value
179+
* @param unit timeout unit
180+
* @throws InterruptedException
181+
*/
176182
public void waitForInit(long timeout, TimeUnit unit) throws InterruptedException {
177183
initDone.await(timeout, unit);
178184
}
@@ -249,7 +255,6 @@ public void rebuild(final Collection<NamedIndexDir> indexDirs) {
249255
return;
250256
}
251257

252-
// for testing
253258
rebuildLock.lock();
254259
rebuilding = true;
255260
rebuildLock.unlock();
@@ -272,7 +277,6 @@ public void rebuild(final Collection<NamedIndexDir> indexDirs) {
272277
shutdownAndAwaitTermination(executor, start, "Suggesters for " + indexDirs + " were successfully rebuilt");
273278
}
274279

275-
// for testing
276280
rebuildLock.lock();
277281
try {
278282
rebuilding = false;
@@ -282,7 +286,12 @@ public void rebuild(final Collection<NamedIndexDir> indexDirs) {
282286
}
283287
}
284288

285-
// for testing
289+
/**
290+
* wait for rebuild to finish.
291+
* @param timeout timeout value
292+
* @param unit timeout unit
293+
* @throws InterruptedException
294+
*/
286295
public void waitForRebuild(long timeout, TimeUnit unit) throws InterruptedException {
287296
rebuildLock.lock();
288297
try {

0 commit comments

Comments
 (0)