use of org.apache.pulsar.common.naming.NamespaceName in project incubator-pulsar by apache.
the class NamespacesImpl method unsubscribeNamespace.
@Override
public void unsubscribeNamespace(String namespace, String subscription) throws PulsarAdminException {
try {
NamespaceName ns = NamespaceName.get(namespace);
WebTarget path = namespacePath(ns, "unsubscribe", subscription);
request(path).post(Entity.entity("", MediaType.APPLICATION_JSON), ErrorData.class);
} catch (Exception e) {
throw getApiException(e);
}
}
use of org.apache.pulsar.common.naming.NamespaceName in project incubator-pulsar by apache.
the class NamespacesImpl method setMaxConsumersPerTopic.
@Override
public void setMaxConsumersPerTopic(String namespace, int maxConsumersPerTopic) throws PulsarAdminException {
try {
NamespaceName ns = NamespaceName.get(namespace);
WebTarget path = namespacePath(ns, "maxConsumersPerTopic");
request(path).post(Entity.entity(maxConsumersPerTopic, MediaType.APPLICATION_JSON), ErrorData.class);
} catch (Exception e) {
throw getApiException(e);
}
}
use of org.apache.pulsar.common.naming.NamespaceName in project incubator-pulsar by apache.
the class NamespacesImpl method getRetention.
@Override
public RetentionPolicies getRetention(String namespace) throws PulsarAdminException {
try {
NamespaceName ns = NamespaceName.get(namespace);
WebTarget path = namespacePath(ns, "retention");
return request(path).get(RetentionPolicies.class);
} catch (Exception e) {
throw getApiException(e);
}
}
use of org.apache.pulsar.common.naming.NamespaceName in project incubator-pulsar by apache.
the class NamespacesImpl method setEncryptionRequiredStatus.
@Override
public void setEncryptionRequiredStatus(String namespace, boolean encryptionRequired) throws PulsarAdminException {
try {
NamespaceName ns = NamespaceName.get(namespace);
WebTarget path = namespacePath(ns, "encryptionRequired");
request(path).post(Entity.entity(encryptionRequired, MediaType.APPLICATION_JSON), ErrorData.class);
} catch (Exception e) {
throw getApiException(e);
}
}
use of org.apache.pulsar.common.naming.NamespaceName in project incubator-pulsar by apache.
the class NamespacesImpl method getMaxConsumersPerSubscription.
@Override
public int getMaxConsumersPerSubscription(String namespace) throws PulsarAdminException {
try {
NamespaceName ns = NamespaceName.get(namespace);
WebTarget path = namespacePath(ns, "maxConsumersPerSubscription");
return request(path).get(Integer.class);
} catch (Exception e) {
throw getApiException(e);
}
}
Aggregations