Пример #1
0
 @Override
 public void run() {
   try {
     while (moreDocumentsExist()) {
       index(inputPipeline.take());
     }
   } catch (Throwable e) {
     throw new RuntimeException(e);
   } finally {
     cleanIndex();
   }
 }
Пример #2
0
 protected int countQueue() {
   return inputPipeline.count();
 }
Пример #3
0
 protected boolean moreDocumentsExist() {
   return !inputPipeline.isDone();
 }