code: @Override
     public synchronized void flush(FlushMode mode)
     {
        if (isShutdown())
           return;
  
        for (Credential credential : pools.keySet())
        {
           ManagedConnectionPool mcp = pools.get(credential);
           if (mcp != null)
           {
              mcp.flush(mode);
  
              if (mcp.isEmpty() && !poolConfiguration.isPrefill())
              {
                 mcp.shutdown();
                 pools.remove(credential);
  
                 if (Tracer.isEnabled())
                    Tracer.destroyManagedConnectionPool(poolConfiguration.getId(), mcp);
              }
           }
        }
     }
docs: {@inheritDoc}