public ListenableFuture send()

in src/main/java/com/aliyun/openservices/aliyun/log/producer/LogProducer.java [360:390]


  public ListenableFuture<Result> send(
      String project,
      String logStore,
      String topic,
      String source,
      String shardHash,
      List<LogItem> logItems,
      Callback callback)
      throws InterruptedException, ProducerException {
    Utils.assertArgumentNotNullOrEmpty(project, "project");
    Utils.assertArgumentNotNullOrEmpty(logStore, "logStore");
    if (topic == null) {
      topic = "";
    }
    Utils.assertArgumentNotNull(logItems, "logItems");
    if (logItems.isEmpty()) {
      throw new IllegalArgumentException("logItems cannot be empty");
    }
    int count = logItems.size();
    if (count > ProducerConfig.MAX_BATCH_COUNT) {
      throw new MaxBatchCountExceedException(
          "the log list size is "
              + count
              + " which exceeds the MAX_BATCH_COUNT "
              + ProducerConfig.MAX_BATCH_COUNT);
    }
    if (shardHash != null && producerConfig.isAdjustShardHash()) {
      shardHash = adjuster.adjust(shardHash);
    }
    return accumulator.append(project, logStore, topic, source, shardHash, logItems, callback);
  }