code: protected void deferredClose() {
          Thread t = new Thread(getClass().getName() + " DeferredClose") {
              @Override
              public void run() {
                  try {
                      synchronized (BaseFileManager.this) {
                          long now = System.currentTimeMillis();
                          while (now < lastUsedTime + deferredCloseTimeout) {
                              BaseFileManager.this.wait(lastUsedTime + deferredCloseTimeout - now);
                              now = System.currentTimeMillis();
                          }
                          deferredCloseTimeout = 0;
                          close();
                      }
                  } catch (InterruptedException e) {
                  } catch (IOException e) {
                  }
              }
          };
          t.setDaemon(true);
          t.start();
      }
docs: Wait for a period of inactivity before calling close().
  The length of the period of inactivity is given by {@code deferredCloseTimeout}