code: @SuppressWarnings("unchecked")
      void notifyProgressiveListeners(final long progress, final long total) {
          final Object listeners = progressiveListeners();
          if (listeners == null) {
              return;
          }
  
          final ProgressiveFuture<V> self = (ProgressiveFuture<V>) this;
  
          EventExecutor executor = executor();
          if (executor.inEventLoop()) {
              if (listeners instanceof GenericProgressiveFutureListener[]) {
                  notifyProgressiveListeners0(
                          self, (GenericProgressiveFutureListener<?>[]) listeners, progress, total);
              } else {
                  notifyProgressiveListener0(
                          self, (GenericProgressiveFutureListener<ProgressiveFuture<V>>) listeners, progress, total);
              }
          } else {
              if (listeners instanceof GenericProgressiveFutureListener[]) {
                  final GenericProgressiveFutureListener<?>[] array =
                          (GenericProgressiveFutureListener<?>[]) listeners;
                  safeExecute(executor, new Runnable() {
                      @Override
                      public void run() {
                          notifyProgressiveListeners0(self, array, progress, total);
                      }
                  });
              } else {
                  final GenericProgressiveFutureListener<ProgressiveFuture<V>> l =
                          (GenericProgressiveFutureListener<ProgressiveFuture<V>>) listeners;
                  safeExecute(executor, new Runnable() {
                      @Override
                      public void run() {
                          notifyProgressiveListener0(self, l, progress, total);
                      }
                  });
              }
          }
      }
docs: Notify all progressive listeners.
  <p>
  No attempt is made to ensure notification order if multiple calls are made to this method before
  the original invocation completes.
  <p>
  This will do an iteration over all listeners to get all of type {@link GenericProgressiveFutureListener}s.
  @param progress the new progress.
  @param total the total progress.