class TcpTransport implements UnpartitionedTransport, Closeable {

  @Override
  public void sendBatch(TransportBuffer buffer) throws TransportException {

    Buffer internalBuffer = ((TcpTransportBuffer) buffer).getInternalBuffer();

    Callable<Boolean> write = () -> {
      try {
        sink.write(internalBuffer, internalBuffer.size());
        return true;
      } catch (IOException ex) {
        throw new TransportException("Error while sending in tcp transport", ex);
      }
    };

    try {
      new CallExecutor(retryConfig).execute(write);
    } catch (RetriesExhaustedException | UnexpectedException ue) {
      throw new TransportException(ue);
    }

  }

  public  TcpTransport(Sink sink, int retryCount, long retryDelayMs);

}