Interface GridServiceManager

All Superinterfaces:
AdminAware, AgentGridComponent, DiscoverableComponent, DumpProvider, GridComponent, LogProviderGridComponent, MachineAware, MetricProvider, OperatingSystemAware, TransportAware, VirtualMachineAware, ZoneAware
All Known Subinterfaces:
InternalGridServiceManager
All Known Implementing Classes:
DefaultGridServiceManager

public interface GridServiceManager extends AgentGridComponent, LogProviderGridComponent, DumpProvider, MetricProvider
A Grid Service Manager is a manager for ProcessingUnit deployments (acting either as primary or backups for a certain processing unit deployment). It also knows which GridServiceContainers are around to be able to create ProcessingUnitInstance on them.
Author:
kimchy
  • Method Details

    • undeploy

      @Deprecated void undeploy(String processingUnitName)
      Deprecated.
      Since 15.5 - use @ProcessingUnit.undeployAsync() instead.
      Undeploys the processing unit based on its name. // wait for the lookup event of the processing unit by name. ProcessingUnit pu = admin.getProcessingUnits().waitFor("mypuname"); // wait for the lookup event of the grid service manager that manages the processing unit. pu.waitForManaged(); // undeploy the processing unit. pu.undeploy();
    • deploy

      Deploys a processing unit based on the processing unit deployment information on the given grid service manager (it will act as the primary GSM for the deployed processing unit).

      The deployment process will wait indefinitely and return the actual processing unit that can be used.

      Throws:
      ProcessingUnitAlreadyDeployedException - - processing unit with the same name has already been deployed.
    • deploy

      ProcessingUnit deploy(ProcessingUnitDeployment deployment, long timeout, TimeUnit timeUnit) throws ProcessingUnitAlreadyDeployedException
      Deploys a processing unit based on the processing unit deployment information on the given grid service manager (it will act as the primary GSM for the deployed processing unit).

      The deployment process will wait for the given timeout and return the actual processing unit that can be used.

      Throws:
      ProcessingUnitAlreadyDeployedException - - processing unit with the same name has already been deployed.
    • deploy

      Deploys a space based on the space deployment information on the given grid service manager (it will act as the primary GSM for the deployed processing unit).

      The deployment process will wait indefinitely and return the actual processing unit that can be used.

      Note, deploying just a space is simply deploying a built in processing unit that starts just an embedded space.

      Throws:
      ProcessingUnitAlreadyDeployedException
    • deploy

      ProcessingUnit deploy(SpaceDeployment deployment, long timeout, TimeUnit timeUnit) throws ProcessingUnitAlreadyDeployedException
      Deploys a space based on the space deployment information on the given grid service manager (it will act as the primary GSM for the deployed processing unit).

      The deployment process will wait for the given timeout and return the actual processing unit that can be used.

      Note, deploying just a space is simply deploying a built in processing unit that starts just an embedded space.

      Throws:
      ProcessingUnitAlreadyDeployedException
    • deploy

      Deploys an application consisting of one or more processing unit deployments.

      The deployment process will wait indefinitely

      Returns:
      An application containing the actual processing units that can be used.
      Throws:
      ApplicationAlreadyDeployedException - - Application with the same name has already been deployed.
      ProcessingUnitAlreadyDeployedException - - Processing unit with the same name has already been deployed. Processing Unit names are globally unique (regardless of the application name)
    • deploy

      Deploys an application consisting of one or more processing unit deployments.

      The deployment process will wait for the given timeout

      Returns:
      An application containing the actual processing units that can be used or null if timeout expired.
      Throws:
      ApplicationAlreadyDeployedException - - Application with the same name has already been deployed.
      ProcessingUnitAlreadyDeployedException - - Processing unit with the same name has already been deployed. Processing Unit names are globally unique (regardless of the application name)
    • deploy

      Deploys a new processing unit based on the specified configuration
      Throws:
      ProcessingUnitAlreadyDeployedException - - processing unit with the same name has already been deployed.
    • deploy

      ProcessingUnit deploy(ProcessingUnitConfigHolder puConfigHolder, long timeout, TimeUnit timeUnit)
      Deploys a new processing unit based on the specified configuration

      The deployment process will wait for the given timeout and return the actual processing unit that can be used.

      Throws:
      ProcessingUnitAlreadyDeployedException - - processing unit with the same name has already been deployed.
    • isDeployed

      boolean isDeployed(String processingUnitName)
      Determine if this deployment is known to this GSM.
      Parameters:
      processingUnitName - the name of the deployed processing unit.
      Returns:
      true if this deployment is known; false otherwise.
    • deploy

      Application deploy(ApplicationConfig applicationConfig)
      Deploys an application consisting of one or more processing unit deployments.

      The deployment process will wait indefinitely

      Returns:
      An application containing the actual processing units that can be used.
      Throws:
      ApplicationAlreadyDeployedException - - Application with the same name has already been deployed.
      ProcessingUnitAlreadyDeployedException - - Processing unit with the same name has already been deployed. Processing Unit names are globally unique (regardless of the application name)
    • deploy

      Deploys an application consisting of one or more processing unit deployments.

      The deployment process will wait for the given timeout

      Returns:
      An application configuration containing the actual processing units that can be used or null if timeout expired.
      Throws:
      ApplicationAlreadyDeployedException - - Application with the same name has already been deployed.
      ProcessingUnitAlreadyDeployedException - - Processing unit with the same name has already been deployed. Processing Unit names are globally unique (regardless of the application name)
    • isActiveManager

      boolean isActiveManager()
      Returns:
      true if managing at least one deployment ; false otherwise
      Since:
      12.1
    • deleteResource

      boolean deleteResource(String resourceName)
      Returns:
      true if successfully deleted the resource folder from the deploy folder ; false otherwise
      Since:
      12.1
    • getUnDeployedPus

      List<UndeployedPuMetaData> getUnDeployedPus()
      Returns:
      List of persistent undeployed processing units
    • deleteUndeployedPuData

      Map<String,String> deleteUndeployedPuData(String puName)
      Delete data of a given undeployed tiered storage processing unit
      Returns:
      response of deletion status for each pu instance
    • setUndeployedLeader

      void setUndeployedLeader(String puName, int partitionId, String instanceId)
      Set leader of a partition in an undeployed tiered storage processing unit.
      Throws:
      AdminException - - failed to find undeployed processing unit / partition id / instance id
    • setUndeployedInstanceIp

      void setUndeployedInstanceIp(String puName, String instanceId, String ip, boolean validateHost)
      Set ip of an instance in an undeployed tiered storage processing unit.
      Throws:
      AdminException - - failed to find undeployed processing unit / partition id / instance id