Interface SystemTopicClient.Writer<T>

All Known Implementing Classes:
TransactionBufferSnapshotBaseSystemTopicClient.TransactionBufferSnapshotWriter
Enclosing interface:
SystemTopicClient<T>

public static interface SystemTopicClient.Writer<T>
Writer for system topic.
  • Method Details

    • write

      org.apache.pulsar.client.api.MessageId write(String key, T t) throws org.apache.pulsar.client.api.PulsarClientException
      Write event to the system topic.
      Parameters:
      key - the key of the event
      t - pulsar event
      Returns:
      message id
      Throws:
      org.apache.pulsar.client.api.PulsarClientException - exception while write event cause
    • writeAsync

      CompletableFuture<org.apache.pulsar.client.api.MessageId> writeAsync(String key, T t)
      Async write event to the system topic.
      Parameters:
      key - the key of the event
      t - pulsar event
      Returns:
      message id future
    • delete

      default org.apache.pulsar.client.api.MessageId delete(String key, T t) throws org.apache.pulsar.client.api.PulsarClientException
      Delete event in the system topic.
      Parameters:
      key - the key of the event
      t - pulsar event
      Returns:
      message id
      Throws:
      org.apache.pulsar.client.api.PulsarClientException - exception while write event cause
    • deleteAsync

      default CompletableFuture<org.apache.pulsar.client.api.MessageId> deleteAsync(String key, T t)
      Async delete event in the system topic.
      Parameters:
      key - the key of the event
      t - pulsar event
      Returns:
      message id future
    • close

      void close() throws IOException
      Close the system topic writer.
      Throws:
      IOException
    • closeAsync

      CompletableFuture<Void> closeAsync()
      Close the writer of the system topic asynchronously.
    • getSystemTopicClient

      SystemTopicClient<T> getSystemTopicClient()
      Get the system topic of the writer.
      Returns:
      system topic