Beispiel #1
0
 void start() {
   bucketWriteLock.lock();
   try {
     ensureNonExistingThread();
     processingWorkerThread = new Thread(processingWorkerRunnable);
     processingWorkerThread.setName(processingWorkerRunnable.getThreadName());
     processingWorkerThread.setDaemon(true);
     processingWorkerThread.start();
   } finally {
     bucketWriteLock.unlock();
   }
 }
Beispiel #2
0
 private String getThreadName() {
   return processingWorkerRunnable.getThreadName();
 }
Beispiel #3
0
 private void ensureNonExistingThread() {
   if (processingWorkerThread != null) {
     throw new AssertionError(processingWorkerRunnable.getThreadName());
   }
 }