private void flushStorageClass(String poolName, String storageClass, int count) {

    PoolFlushDoFlushMessage msg = new PoolFlushDoFlushMessage(poolName, storageClass);
    msg.setMaxFlushCount(count);

    sendMessage(new CellMessage(new CellPath(poolName), msg));
  }
  /////////////////////////////////////////////////////////////////////////////////////////
  //
  //      message arrived handler
  //
  private void poolFlushDoFlushMessageArrived(PoolFlushDoFlushMessage msg) {
    if (LOG_ENABLED) {
      _log.info("poolFlushDoFlushMessageArrived : " + msg);
    }
    String poolName = msg.getPoolName();
    synchronized (_poolCollector) {
      HFCPool pool = _poolCollector.getPoolByName(poolName);
      if (pool == null) {
        _log.warn(
            "poolFlushDoFlushMessageArrived : message arrived for non configured pool : "
                + poolName);
        return;
      }
      String storageClass = msg.getStorageClassName() + "@" + msg.getHsmName();
      HFCFlushInfo info = pool.flushInfos.get(storageClass);
      if (info == null) {
        _log.warn(
            "poolFlushDoFlushMessageArrived : message arrived for non existing storage class : "
                + storageClass);
        //
        // the real one doesn't exists anymore, so we simulate one.
        //
        info =
            new HFCFlushInfo(
                pool, new StorageClassFlushInfo(msg.getHsmName(), msg.getStorageClassName()));
      }
      if (msg.getReturnCode() != 0) {
        if (LOG_ENABLED) {
          _log.info("Flush failed (msg=" + (msg.isFinished() ? "Finished" : "Ack") + ") : " + msg);
        }

        info.setFlushingFailed(msg.getReturnCode(), msg.getErrorObject());
        //
        // maybe we have to call flushingDone here as well.
        //
        return;
      }
      if (msg.isFinished()) {
        if (LOG_ENABLED) {
          _log.info("Flush finished : " + msg);
        }

        updateFlushCellAndFlushInfos(msg, pool);
        info.setFlushingDone();
        _eventDispatcher.flushingDone(info);
      } else {
        info.setFlushingAck(msg.getFlushId());
      }
    }
  }