38
38
* Admin interface for clusters management.
39
39
*/
40
40
public interface Clusters {
41
+
42
+ /**
43
+ * Defaults for all the flags.
44
+ */
45
+ boolean UNLOAD_BUNDLE_DEFAULT = false ;
46
+
41
47
/**
42
48
* Get the list of clusters.
43
49
* <p/>
@@ -418,9 +424,15 @@ Map<String, NamespaceIsolationData> getNamespaceIsolationPolicies(String cluster
418
424
* Unexpected error
419
425
*/
420
426
void createNamespaceIsolationPolicy (
421
- String cluster , String policyName , NamespaceIsolationData namespaceIsolationData )
427
+ String cluster , String policyName , NamespaceIsolationData namespaceIsolationData , boolean unloadBundles )
422
428
throws PulsarAdminException ;
423
429
430
+ default void createNamespaceIsolationPolicy (
431
+ String cluster , String policyName , NamespaceIsolationData namespaceIsolationData )
432
+ throws PulsarAdminException {
433
+ createNamespaceIsolationPolicy (cluster , policyName , namespaceIsolationData , UNLOAD_BUNDLE_DEFAULT );
434
+ }
435
+
424
436
/**
425
437
* Create a namespace isolation policy for a cluster asynchronously.
426
438
* <p/>
@@ -437,7 +449,13 @@ void createNamespaceIsolationPolicy(
437
449
* @return
438
450
*/
439
451
CompletableFuture <Void > createNamespaceIsolationPolicyAsync (
440
- String cluster , String policyName , NamespaceIsolationData namespaceIsolationData );
452
+ String cluster , String policyName , NamespaceIsolationData namespaceIsolationData , boolean unloadBundles );
453
+
454
+ default CompletableFuture <Void > createNamespaceIsolationPolicyAsync (
455
+ String cluster , String policyName , NamespaceIsolationData namespaceIsolationData ) {
456
+ return createNamespaceIsolationPolicyAsync (cluster , policyName , namespaceIsolationData , UNLOAD_BUNDLE_DEFAULT );
457
+ }
458
+
441
459
442
460
/**
443
461
* Returns list of active brokers with namespace-isolation policies attached to it.
@@ -506,9 +524,15 @@ CompletableFuture<BrokerNamespaceIsolationData> getBrokerWithNamespaceIsolationP
506
524
* Unexpected error
507
525
*/
508
526
void updateNamespaceIsolationPolicy (
509
- String cluster , String policyName , NamespaceIsolationData namespaceIsolationData )
527
+ String cluster , String policyName , NamespaceIsolationData namespaceIsolationData , boolean unloadBundles )
510
528
throws PulsarAdminException ;
511
529
530
+ default void updateNamespaceIsolationPolicy (
531
+ String cluster , String policyName , NamespaceIsolationData namespaceIsolationData )
532
+ throws PulsarAdminException {
533
+ updateNamespaceIsolationPolicy (cluster , policyName , namespaceIsolationData , UNLOAD_BUNDLE_DEFAULT );
534
+ }
535
+
512
536
/**
513
537
* Update a namespace isolation policy for a cluster asynchronously.
514
538
* <p/>
@@ -526,7 +550,12 @@ void updateNamespaceIsolationPolicy(
526
550
*
527
551
*/
528
552
CompletableFuture <Void > updateNamespaceIsolationPolicyAsync (
529
- String cluster , String policyName , NamespaceIsolationData namespaceIsolationData );
553
+ String cluster , String policyName , NamespaceIsolationData namespaceIsolationData , boolean unloadBundles );
554
+
555
+ default CompletableFuture <Void > updateNamespaceIsolationPolicyAsync (
556
+ String cluster , String policyName , NamespaceIsolationData namespaceIsolationData ) {
557
+ return updateNamespaceIsolationPolicyAsync (cluster , policyName , namespaceIsolationData , UNLOAD_BUNDLE_DEFAULT );
558
+ }
530
559
531
560
/**
532
561
* Delete a namespace isolation policy for a cluster.
0 commit comments