Class TransactionBufferSnapshotBaseSystemTopicClient.TransactionBufferSnapshotWriter<T>
java.lang.Object
org.apache.pulsar.broker.systopic.TransactionBufferSnapshotBaseSystemTopicClient.TransactionBufferSnapshotWriter<T>
- All Implemented Interfaces:
SystemTopicClient.Writer<T>
- Enclosing class:
- TransactionBufferSnapshotBaseSystemTopicClient<T>
protected static class TransactionBufferSnapshotBaseSystemTopicClient.TransactionBufferSnapshotWriter<T>
extends Object
implements SystemTopicClient.Writer<T>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final org.apache.pulsar.client.api.Producer<T>protected final TransactionBufferSnapshotBaseSystemTopicClient<T> -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedTransactionBufferSnapshotWriter(org.apache.pulsar.client.api.Producer<T> producer, TransactionBufferSnapshotBaseSystemTopicClient<T> transactionBufferSnapshotBaseSystemTopicClient) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Close the system topic writer.Close the writer of the system topic asynchronously.org.apache.pulsar.client.api.MessageIdDelete event in the system topic.CompletableFuture<org.apache.pulsar.client.api.MessageId>deleteAsync(String key, T t) Async delete event in the system topic.Get the system topic of the writer.org.apache.pulsar.client.api.MessageIdWrite event to the system topic.CompletableFuture<org.apache.pulsar.client.api.MessageId>writeAsync(String key, T t) Async write event to the system topic.
-
Field Details
-
producer
-
transactionBufferSnapshotBaseSystemTopicClient
protected final TransactionBufferSnapshotBaseSystemTopicClient<T> transactionBufferSnapshotBaseSystemTopicClient
-
-
Constructor Details
-
TransactionBufferSnapshotWriter
protected TransactionBufferSnapshotWriter(org.apache.pulsar.client.api.Producer<T> producer, TransactionBufferSnapshotBaseSystemTopicClient<T> transactionBufferSnapshotBaseSystemTopicClient)
-
-
Method Details
-
write
public org.apache.pulsar.client.api.MessageId write(String key, T t) throws org.apache.pulsar.client.api.PulsarClientException Description copied from interface:SystemTopicClient.WriterWrite event to the system topic.- Specified by:
writein interfaceSystemTopicClient.Writer<T>- Parameters:
key- the key of the eventt- pulsar event- Returns:
- message id
- Throws:
org.apache.pulsar.client.api.PulsarClientException- exception while write event cause
-
writeAsync
Description copied from interface:SystemTopicClient.WriterAsync write event to the system topic.- Specified by:
writeAsyncin interfaceSystemTopicClient.Writer<T>- Parameters:
key- the key of the eventt- pulsar event- Returns:
- message id future
-
delete
public org.apache.pulsar.client.api.MessageId delete(String key, T t) throws org.apache.pulsar.client.api.PulsarClientException Description copied from interface:SystemTopicClient.WriterDelete event in the system topic.- Specified by:
deletein interfaceSystemTopicClient.Writer<T>- Parameters:
key- the key of the eventt- pulsar event- Returns:
- message id
- Throws:
org.apache.pulsar.client.api.PulsarClientException- exception while write event cause
-
deleteAsync
Description copied from interface:SystemTopicClient.WriterAsync delete event in the system topic.- Specified by:
deleteAsyncin interfaceSystemTopicClient.Writer<T>- Parameters:
key- the key of the eventt- pulsar event- Returns:
- message id future
-
close
Description copied from interface:SystemTopicClient.WriterClose the system topic writer.- Specified by:
closein interfaceSystemTopicClient.Writer<T>- Throws:
IOException
-
closeAsync
Description copied from interface:SystemTopicClient.WriterClose the writer of the system topic asynchronously.- Specified by:
closeAsyncin interfaceSystemTopicClient.Writer<T>
-
getSystemTopicClient
Description copied from interface:SystemTopicClient.WriterGet the system topic of the writer.- Specified by:
getSystemTopicClientin interfaceSystemTopicClient.Writer<T>- Returns:
- system topic
-