All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.apache.pulsar.client.admin.ResourceGroups Maven / Gradle / Ivy

There is a newer version: 4.0.0.4
Show newest version
/*
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied.  See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */
package org.apache.pulsar.client.admin;

import java.util.List;
import java.util.concurrent.CompletableFuture;
import org.apache.pulsar.common.policies.data.ResourceGroup;

/**
 * Admin interface for ResourceGroups management.
 */

public interface ResourceGroups {

        /**
         * Get the list of resourcegroups.
         * 

* Get the list of all the resourcegroup. *

* Response Example: * *

         * ["resourcegroup1",
         *  "resourcegroup2",
         *  "resourcegroup3"]
         * 
* * @throws PulsarAdminException.NotAuthorizedException Don't have admin permission * @throws PulsarAdminException Unexpected error */ List getResourceGroups() throws PulsarAdminException; /** * Get the list of resourcegroups asynchronously. *

* Get the list of all the resourcegrops. *

* Response Example: * *

         * ["resourcegroup1",
         *  "resourcegroup2",
         *  "resourcegroup3"]
         * 
*/ CompletableFuture> getResourceGroupsAsync(); /** * Get configuration for a resourcegroup. *

* Get configuration specified for a resourcegroup. *

* Response Example: * *

         * 
         *     "publishRateInMsgs" : "value",
         *     "PublishRateInBytes" : "value",
         *     "DispatchRateInMsgs" : "value",
         *     "DispatchRateInBytes" : "value"
         * 
         * 
* * @param resourcegroup String resourcegroup * @throws PulsarAdminException.NotAuthorizedException You don't have admin permission * @throws PulsarAdminException.NotFoundException Resourcegroup does not exist * @throws PulsarAdminException Unexpected error * @see ResourceGroup *

* * */ ResourceGroup getResourceGroup(String resourcegroup) throws PulsarAdminException; /** * Get policies for a namespace asynchronously. *

* Get cnfiguration specified for a resourcegroup. *

* Response example: * *

         * 
         *     "publishRateInMsgs" : "value",
         *     "PublishRateInBytes" : "value",
         *     "DispatchRateInMsgs" : "value",
         *     "DspatchRateInBytes" : "value"
         * 
         * 
* * @param resourcegroup Namespace name * @see ResourceGroup */ CompletableFuture getResourceGroupAsync(String resourcegroup); /** * Create a new resourcegroup. *

* Creates a new reourcegroup with the configuration specified. * * @param name resourcegroup name * @param resourcegroup ResourceGroup configuration * @throws PulsarAdminException.NotAuthorizedException You don't have admin permission * @throws PulsarAdminException.ConflictException Resourcegroup already exists * @throws PulsarAdminException Unexpected error */ void createResourceGroup(String name, ResourceGroup resourcegroup) throws PulsarAdminException; /** * Create a new resourcegroup. *

* Creates a new resourcegroup with the configuration specified. * * @param name resourcegroup name * @param resourcegroup ResourceGroup configuration. */ CompletableFuture createResourceGroupAsync(String name, ResourceGroup resourcegroup); /** * Update the configuration for a ResourceGroup. *

* This operation requires Pulsar super-user privileges. * * @param name resourcegroup name * @param resourcegroup resourcegroup configuration * * @throws PulsarAdminException.NotAuthorizedException * Don't have admin permission * @throws PulsarAdminException.NotFoundException * ResourceGroup does not exist * @throws PulsarAdminException * Unexpected error */ void updateResourceGroup(String name, ResourceGroup resourcegroup) throws PulsarAdminException; /** * Update the configuration for a ResourceGroup. *

* This operation requires Pulsar super-user privileges. * * @param name resourcegroup name * @param resourcegroup resourcegroup configuration */ CompletableFuture updateResourceGroupAsync(String name, ResourceGroup resourcegroup); /** * Delete an existing resourcegroup. *

* The resourcegroup needs to unused and not attached to any entity. * * @param resourcegroup Resourcegroup name * @throws PulsarAdminException.NotAuthorizedException You don't have admin permission * @throws PulsarAdminException.NotFoundException Resourcegroup does not exist * @throws PulsarAdminException.ConflictException Resourcegroup is in use * @throws PulsarAdminException Unexpected error */ void deleteResourceGroup(String resourcegroup) throws PulsarAdminException; /** * Delete an existing resourcegroup. *

* The resourcegroup needs to unused and not attached to any entity. * * @param resourcegroup Resourcegroup name */ CompletableFuture deleteResourceGroupAsync(String resourcegroup); }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy