Java Code Examples for org.apache.pulsar.common.naming.TopicDomain#non_persistent()

The following examples show how to use org.apache.pulsar.common.naming.TopicDomain#non_persistent() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: PartitionCreationTest.java    From pulsar with Apache License 2.0 5 votes vote down vote up
@DataProvider(name = "topicDomainProvider")
public Object[][] topicDomainProvider() {
    return new Object[][] {
            { TopicDomain.persistent },
            { TopicDomain.non_persistent }
    };
}
 
Example 2
Source File: ProducerCreationTest.java    From pulsar with Apache License 2.0 5 votes vote down vote up
@DataProvider(name = "topicDomainProvider")
public Object[][] topicDomainProvider() {
    return new Object[][] {
            { TopicDomain.persistent },
            { TopicDomain.non_persistent }
    };
}
 
Example 3
Source File: CliCommand.java    From pulsar with Apache License 2.0 5 votes vote down vote up
static String validateNonPersistentTopic(List<String> params) {
    String topic = checkArgument(params);
    TopicName topicName = TopicName.get(topic);
    if (topicName.getDomain() != TopicDomain.non_persistent) {
        throw new ParameterException("Need to provide a non-persistent topic name");
    }
    return topicName.toString();
}