Modifier and Type | Method and Description |
---|---|
void |
createTopic(String topic)
Creates a new topic with the default topic properties.
|
void |
createTopic(String topic,
Map<String,String> properties)
Creates a new topic.
|
void |
deleteTopic(String topic)
Deletes a topic.
|
Map<String,String> |
getTopicProperties(String topic)
Returns the properties of a topic.
|
void |
updateTopic(String topic,
Map<String,String> properties)
Updates the properties of a topic.
|
void createTopic(String topic) throws TopicAlreadyExistsException, IOException, AccessException
topic
- name of the topicIOException
- if there was a failure to communicate with the messaging system. Caller may retry this call or
use the getTopicProperties(String)
method to verify that the topic has been created.IllegalArgumentException
- if the topic name is invalid. A valid id should only contain alphanumeric
characters, _
, or -
.TopicAlreadyExistsException
- if the topic already existsAccessException
- if caller do not have proper access to the topicvoid createTopic(String topic, Map<String,String> properties) throws TopicAlreadyExistsException, IOException, AccessException
topic
- name of the topicproperties
- properties for the topicIOException
- if there was a failure to communicate with the messaging system. Caller may retry this call or
use the getTopicProperties(String)
method to verify that the topic has been created.IllegalArgumentException
- if the topic name is invalid. A valid id should only contain alphanumeric
characters, _
, or -
.TopicAlreadyExistsException
- if the topic already existsAccessException
- if caller do not have proper access to the topicMap<String,String> getTopicProperties(String topic) throws TopicNotFoundException, IOException, AccessException
topic
- name of the topicIOException
- if failed to communicate with the messaging system.IllegalArgumentException
- if the topic name is invalid. A valid id should only contain alphanumeric
characters, _
, or -
.TopicNotFoundException
- if the topic does not existAccessException
- if caller do not have proper access to the topicvoid updateTopic(String topic, Map<String,String> properties) throws TopicNotFoundException, IOException, AccessException
topic
- name of the topicproperties
- the topic properties. This will overwrite the existing properties.IOException
- if there was a failure to communicate with the messaging system. Caller may use
the getTopicProperties(String)
method to verify that the properties have been updated.IllegalArgumentException
- if the topic name is invalid. A valid id should only contain alphanumeric
characters, _
, or -
.TopicNotFoundException
- if the topic does not existAccessException
- if caller do not have proper access to the topicvoid deleteTopic(String topic) throws TopicNotFoundException, IOException, AccessException
topic
- name of the topicIOException
- if there was a failure to communicate with the messaging system. Caller may retry this call or
use the getTopicProperties(String)
method to verify that the topic has been deleted.IllegalArgumentException
- if the topic name is invalid. A valid id should only contain alphanumeric
characters, _
, or -
.TopicNotFoundException
- if the topic does not existAccessException
- if caller do not have proper access to the topicCopyright © 2022 Cask Data, Inc. Licensed under the Apache License, Version 2.0.