content: package com.alicloud.openservices.tablestore.core;
  
  import com.alicloud.openservices.tablestore.ClientConfiguration;
  import com.alicloud.openservices.tablestore.core.auth.CredentialsProvider;
  import com.alicloud.openservices.tablestore.core.auth.ServiceCredentials;
  import com.alicloud.openservices.tablestore.core.http.AsyncServiceClient;
  import com.alicloud.openservices.tablestore.core.http.GetStreamRecordResponseConsumer;
  import com.alicloud.openservices.tablestore.core.http.OTSUri;
  import com.alicloud.openservices.tablestore.core.protocol.OTSProtocolBuilder;
  import com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi;
  import com.alicloud.openservices.tablestore.core.protocol.ResultParserFactory;
  import com.alicloud.openservices.tablestore.core.utils.LogUtil;
  import com.alicloud.openservices.tablestore.core.utils.Preconditions;
  import com.alicloud.openservices.tablestore.model.GetStreamRecordRequest;
  import com.alicloud.openservices.tablestore.model.GetStreamRecordResponse;
  import com.alicloud.openservices.tablestore.model.RetryStrategy;
  import com.aliyun.ots.thirdparty.org.apache.http.concurrent.FutureCallback;
  
  public class GetStreamRecordLauncher extends OperationLauncher<GetStreamRecordRequest, GetStreamRecordResponse> {
      private OTSUri uri;
      private TraceLogger tracer;
      private RetryStrategy retry;
  
      public GetStreamRecordLauncher(
              OTSUri uri,
              TraceLogger tracer,
              RetryStrategy retry,
              String instanceName,
              AsyncServiceClient client,
              CredentialsProvider crdsProvider,
              ClientConfiguration config,
              GetStreamRecordRequest originRequest)
      {
          super(instanceName, client, crdsProvider, config, originRequest);
  
          Preconditions.checkNotNull(uri);
          Preconditions.checkNotNull(tracer);
          Preconditions.checkNotNull(retry);
  
          this.uri = uri;
          this.tracer = tracer;
          this.retry = retry;
      }
  
      @Override
      public void fire(GetStreamRecordRequest req, FutureCallback<GetStreamRecordResponse> cb) {
          LogUtil.logBeforeExecution(tracer, retry);
  
          OtsInternalApi.GetStreamRecordResponse defaultResponse =
              OtsInternalApi.GetStreamRecordResponse.getDefaultInstance();
          asyncInvokePost(
              uri,
              null,
              OTSProtocolBuilder.buildGetStreamRecordRequest(req),
              tracer,
              new GetStreamRecordResponseConsumer(
                  ResultParserFactory.createFactory().createProtocolBufferResultParser(
                      defaultResponse, tracer.getTraceId()),
                  tracer, retry, lastResult, req.isParseInTimeseriesDataFormat()),
              cb);
      }
  }
  