Package org.apache.pulsar.broker.service
Class SystemTopicBaseTxnBufferSnapshotService
java.lang.Object
org.apache.pulsar.broker.service.SystemTopicBaseTxnBufferSnapshotService
- All Implemented Interfaces:
TransactionBufferSnapshotService
public class SystemTopicBaseTxnBufferSnapshotService
extends Object
implements TransactionBufferSnapshotService
-
Constructor Summary
ConstructorsConstructorDescriptionSystemTopicBaseTxnBufferSnapshotService(org.apache.pulsar.client.api.PulsarClient client) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Close transaction buffer snapshot service.createReader(org.apache.pulsar.common.naming.TopicName topicName) Create a transaction buffer snapshot reader.createWriter(org.apache.pulsar.common.naming.TopicName topicName) Create a transaction buffer snapshot writer.voidremoveClient(org.apache.pulsar.common.naming.TopicName topicName, TransactionBufferSystemTopicClient transactionBufferSystemTopicClient) Remove a topic client from cache.
-
Constructor Details
-
SystemTopicBaseTxnBufferSnapshotService
public SystemTopicBaseTxnBufferSnapshotService(org.apache.pulsar.client.api.PulsarClient client)
-
-
Method Details
-
createWriter
public CompletableFuture<SystemTopicClient.Writer<TransactionBufferSnapshot>> createWriter(org.apache.pulsar.common.naming.TopicName topicName) Description copied from interface:TransactionBufferSnapshotServiceCreate a transaction buffer snapshot writer.- Specified by:
createWriterin interfaceTransactionBufferSnapshotService- Parameters:
topicName-TopicNamethe topic name- Returns:
CompletableFuture<SystemTopicClient.Writer>return the future of writer
-
createReader
public CompletableFuture<SystemTopicClient.Reader<TransactionBufferSnapshot>> createReader(org.apache.pulsar.common.naming.TopicName topicName) Description copied from interface:TransactionBufferSnapshotServiceCreate a transaction buffer snapshot reader.- Specified by:
createReaderin interfaceTransactionBufferSnapshotService- Parameters:
topicName-TopicNamethe topic name- Returns:
CompletableFuture<SystemTopicClient.Writer>return the future of reader
-
removeClient
public void removeClient(org.apache.pulsar.common.naming.TopicName topicName, TransactionBufferSystemTopicClient transactionBufferSystemTopicClient) Description copied from interface:TransactionBufferSnapshotServiceRemove a topic client from cache.- Specified by:
removeClientin interfaceTransactionBufferSnapshotService- Parameters:
topicName-TopicNamethe topic nametransactionBufferSystemTopicClient-TransactionBufferSystemTopicClientthe topic client
-
close
Description copied from interface:TransactionBufferSnapshotServiceClose transaction buffer snapshot service.- Specified by:
closein interfaceTransactionBufferSnapshotService- Throws:
Exception
-