Interface InternalProcessingUnit

All Superinterfaces:
AdminAware, InternalApplicationAware, InternalProcessingUnitInstancesAware, Iterable<ProcessingUnitInstance>, ProcessingUnit, StatisticsMonitor
All Known Implementing Classes:
DefaultProcessingUnit

public interface InternalProcessingUnit extends ProcessingUnit, InternalProcessingUnitInstancesAware, InternalApplicationAware
Author:
kimchy
  • Method Details

    • setNumberOfInstances

      void setNumberOfInstances(int numberOfInstances)
    • setNumberOfBackups

      void setNumberOfBackups(int numberOfBackups)
    • setManagingGridServiceManager

      void setManagingGridServiceManager(GridServiceManager gridServiceManager)
    • addManagingGridServiceManager

      void addManagingGridServiceManager(GridServiceManager gridServiceManager)
    • addBackupGridServiceManager

      void addBackupGridServiceManager(GridServiceManager backupGridServiceManager)
    • removeBackupGridServiceManager

      void removeBackupGridServiceManager(String gsmUID)
    • setStatus

      boolean setStatus(int statusCode)
    • addProcessingUnitInstance

      void addProcessingUnitInstance(ProcessingUnitInstance processingUnitInstance)
    • removeProcessingUnitInstance

      void removeProcessingUnitInstance(String uid)
    • addEmbeddedSpace

      void addEmbeddedSpace(Space space)
    • removeEmbeddedSpace

      boolean removeEmbeddedSpace(Space space)
      Since:
      9.1.0
    • getApplicationName

      String getApplicationName()
    • getClusterSchema

      String getClusterSchema()
    • getSimpleName

      String getSimpleName()
      In the case of application name prefix just processing unit name will be returned. Otherwise name will be returned.
      Since:
      8.0.6
    • getApplicationDependencies

      String getApplicationDependencies()
      Retrieves a context property containing the order of dependencies within an application.
      Returns:
      The property value, in a CSV format.
      Since:
      8.0.4
    • decrementPlannedInstances

      boolean decrementPlannedInstances()
      Decrements a planned instance if the number of planned instances is less then the actual instances to maintain.
      Returns:
      true if a planned instance was successfully decremented; false planned instances hasn't changed.
      Since:
      8.0.4
    • processProvisionEvent

      void processProvisionEvent(org.jini.rio.monitor.ProvisionLifeCycleEvent provisionLifeCycleEvent)
      Since:
      8.0.6
    • getProvisionStatusPerInstance

      Map<String, InternalProvisionStatusHolder> getProvisionStatusPerInstance()
      Since:
      8.0.6
    • getStatistics

      ProcessingUnitStatistics getStatistics()
      Returns:
      the processing unit (aggregated) statistics.
      Since:
      9.0.0
    • addStatisticsCalculation

      void addStatisticsCalculation(ProcessingUnitStatisticsId statisticsId)
      Adds the specified statistics calculation
      Since:
      9.0.0
    • removeStatisticsCalculation

      void removeStatisticsCalculation(ProcessingUnitStatisticsId statisticsId)
      Removes the specified statistics calculation
      Since:
      9.0.0
    • getStatisticsCalculations

      Set<ProcessingUnitStatisticsId> getStatisticsCalculations()
      Returns:
      the generated statistics identifiers.
      Since:
      9.0.0
    • getHostingGridServiceAgentZones

      ExactZonesConfig getHostingGridServiceAgentZones(ProcessingUnitInstance processingUnitInstance) throws AdminException
      return the exact zones of the agent that belongs to processing unit instance
      Throws:
      AdminException
      Since:
      9.1.0
    • setBackupGsmInSync

      void setBackupGsmInSync(boolean isBackupInSync)
      Parameters:
      isBackupInSync - - true if backup GSM is in sync with primary GSM, false if out of sync.
    • isBackupGsmInSync

      boolean isBackupGsmInSync()
      Returns:
      true if backup GSM is in sync with primary GSM, false if out of sync or no backup gsm.
    • getProcessingUnitInstanceByUid

      ProcessingUnitInstance getProcessingUnitInstanceByUid(String uid)
      returns the processing unit instance based on its uid (see GridComponent.getUid())
      Parameters:
      uid - the unique id of the processing unit instance
      Returns:
      the processing unit instance or null
      Since:
      10.1.1
    • isStandaloneProcessingUnit

      boolean isStandaloneProcessingUnit()
      Returns:
      true if this processing unit is un-managed by the Service Grid.
      Since:
      14.0.0
    • scaleHorizontal

      void scaleHorizontal(int target, String memory, String cpu, String requestId)
    • scaleHorizontal

      void scaleHorizontal(int target, String memory, String cpu, String requestId, CredentialsProvider credentialsProvider)
      Same as scaleHorizontal(int, String, String, String), with the credentials used to execute the scale tasks (drain, copy chunks, ...) on a secured space. When null, the Admin's own credentials are used (if any).
      Since:
      18.0.1
    • scaleVertical

      void scaleVertical(String memory, String cpu, Long timeout, PuScaleVStatusChangedEventListener listener)
    • cancelScaleOut

    • getClusterTopology

      ClusterTopology getClusterTopology() throws IOException
      Throws:
      IOException
    • lock

      SharedLock lock() throws Exception
      Throws:
      Exception
    • lock

    • setStub

      void setStub(boolean stub)
      Parameters:
      stub - - true if PU was created before any instance
    • isStub

      boolean isStub()
    • updateStub

      void updateStub(ProcessingUnitInstance processingUnitInstance)