@Override
 public void closingHook() {
   if (nextRunnableForClosingHook != null) {
     nextRunnableForClosingHook.setProv(getProv());
     nextRunnableForClosingHook.closingHook();
     nextRunnableForClosingHook = null;
   }
 }
 @Override
 public void openingHook() {
   if (list.size() > 0) {
     RunnableWithLazyProxyDirTreeDbProvider r = list.get(0);
     r.setProv(getProv());
     r.openingHook();
     isOpeningHookFinished = true;
   }
 }
 @Override
 public void run() throws SQLException {
   while (list.size() > 0) {
     RunnableWithLazyProxyDirTreeDbProvider r = list.get(0);
     try {
       ((StackingNonPreemptiveThread) Thread.currentThread()).setTopPriority();
       closingHook();
       r.setProv(getProv());
       if (isOpeningHookFinished) {
         isOpeningHookFinished = false;
       } else {
         r.openingHook();
       }
       r.run();
       nextRunnableForClosingHook = r;
     } catch (InterruptedException e) {
     }
     list.remove(0);
   }
 }