liangyepianzhou commented on a change in pull request #11333:
URL: https://github.com/apache/pulsar/pull/11333#discussion_r671029110



##########
File path: 
pulsar-client-admin/src/main/java/org/apache/pulsar/client/admin/internal/NamespacesImpl.java
##########
@@ -3616,6 +3616,66 @@ public void clearProperties(String namespace) throws 
PulsarAdminException {
         return asyncDeleteRequest(path);
     }
 
+    @Override
+    public void setTransactionEnable(String namespace, boolean 
transactionEnable) throws PulsarAdminException {
+        try {
+            setTransactionEnableAsync(namespace, transactionEnable)
+                    .get(this.readTimeoutMs, TimeUnit.MILLISECONDS);
+        } catch (ExecutionException e) {
+            throw (PulsarAdminException) e.getCause();
+        } catch (InterruptedException e) {
+            Thread.currentThread().interrupt();
+            throw new PulsarAdminException(e);
+        } catch (TimeoutException e) {
+            throw new PulsarAdminException.TimeoutException(e);
+        }
+    }
+
+    @Override
+    public CompletableFuture<Void> setTransactionEnableAsync(String namespace, 
boolean transactionEnable) {
+        NamespaceName ns = NamespaceName.get(namespace);
+        WebTarget path = namespacePath(ns, "transactionEnabled");
+        return asyncPostRequest(path, Entity.entity(transactionEnable, 
MediaType.APPLICATION_JSON));
+    }
+
+    @Override
+    public boolean getTransactionEnabled(String namespace) throws 
PulsarAdminException {
+        try {
+            return 
getTransactionEnabledAsync(namespace).get(this.readTimeoutMs, 
TimeUnit.MILLISECONDS);
+        } catch (ExecutionException e) {
+            throw (PulsarAdminException) e.getCause();
+        } catch (InterruptedException e) {
+            Thread.currentThread().interrupt();
+            throw new PulsarAdminException(e);
+        } catch (TimeoutException e) {
+            throw new PulsarAdminException.TimeoutException(e);
+        }
+    }
+
+    @Override
+    public CompletableFuture<Boolean> getTransactionEnabledAsync(String 
namespace) {

Review comment:
       Excuse me, I didn't understand what you mean




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to