@InterfaceAudience.Public @InterfaceStability.Evolving public interface TableViewBuilder<T>
TableViewBuilder is used to configure and create instances of TableView.()| Modifier and Type | Method and Description |
|---|---|
TableViewBuilder<T> |
autoUpdatePartitionsInterval(int interval,
TimeUnit unit)
Set the interval of updating partitions (default: 1 minute).
|
TableView<T> |
create()
Finalize the creation of the
TableView instance. |
CompletableFuture<TableView<T>> |
createAsync()
Finalize the creation of the
TableView instance in asynchronous mode. |
TableViewBuilder<T> |
loadConf(Map<String,Object> config)
Load the configuration from provided config map.
|
TableViewBuilder<T> |
topic(String topic)
Set the topic name of the
TableView. |
TableViewBuilder<T> loadConf(Map<String,Object> config)
Example:
Map<String, Object> config = new HashMap<>();
config.put("topicName", "test-topic");
config.put("autoUpdatePartitionsSeconds", "300");
TableViewBuilder<byte[]> builder = ...;
builder = builder.loadConf(config);
TableView<byte[]> tableView = builder.create();
config - configuration to loadTableViewBuilder instanceTableView<T> create() throws PulsarClientException
TableView instance.
This method will block until the tableView is created successfully or an exception is thrown.
TableView instancePulsarClientException - if the tableView creation failsCompletableFuture<TableView<T>> createAsync()
TableView instance in asynchronous mode.
This method will return a CompletableFuture that can be used to access the instance when it's ready.
TableView instanceTableViewBuilder<T> topic(String topic)
TableView.topic - the name of the topic to create the TableViewTableViewBuilder builder instanceTableViewBuilder<T> autoUpdatePartitionsInterval(int interval, TimeUnit unit)
interval - the interval of updating partitionsunit - the time unit of the intervalTableViewBuilder builder instanceCopyright © 2017–2022 Apache Software Foundation. All rights reserved.