code: protected boolean isFirehoseDrainableByClosing(FirehoseFactory firehoseFactory)
    {
      return firehoseFactory instanceof EventReceiverFirehoseFactory
             || (firehoseFactory instanceof TimedShutoffFirehoseFactory
                 && isFirehoseDrainableByClosing(((TimedShutoffFirehoseFactory) firehoseFactory).getDelegateFactory()))
             || (firehoseFactory instanceof ClippedFirehoseFactory
                 && isFirehoseDrainableByClosing(((ClippedFirehoseFactory) firehoseFactory).getDelegate()));
    }
docs: Is a firehose from this factory drainable by closing it? If so, we should drain on stopGracefully rather than
  abruptly stopping.
  <p>
  This is a hack to get around the fact that the Firehose and FirehoseFactory interfaces do not help us do this.
  <p>
  Protected for tests.