code: public static int getQueueSize() {
          if (instance != null && instance.executor != null) {
              return instance.executor.getQueue().size();
          } else {
              return 0;
          }
      }
docs: Returns the current queue size.
  
  @return the queue size,
  @see java.util.concurrent.ThreadPoolExecutor#getQueue()