Class ProcessingUnitDeployment
- All Implemented Interfaces:
ProcessingUnitDeploymentTopology
- Author:
- kimchy
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionProcessingUnitDeployment(File processingUnit) Constructs a processing unit deployment based on the specified processing unit file path (points either to a processing unit jar/zip file or a directory).ProcessingUnitDeployment(String processingUnitName) Constructs a processing unit deployment based on the specified processing unit name (should exists under the[GS ROOT]/deploydirectory. -
Method Summary
Modifier and TypeMethodDescriptionaddDependencies(ProcessingUnitDetailedDependencies<? extends ProcessingUnitDependency> detailedDependencies) Postpones deployment of processing unit instances until the specified dependencies are met.addDependency(String requiredProcessingUnitName) Postpones deployment of processing unit instances deployment until the specified processing unit deployment is complete.addPrimaryZone(String primaryZone) Adds a preferred zone for primary instances.Adds a zone where the processing unit is allowed to be deployed on.clusterSchema(String clusterSchema) Controls the cluster schema of the deployment.create()Converts this fluent API object to a lazy implementation of ProcessingUnitConfigString[]Deprecated.Deprecated.Deprecated.maxInstancesPerMachine(int maxInstancesPerMachine) Sets the maximum number of instances per machine.maxInstancesPerVM(int maxInstancesPerVM) Sets the maximum number of instances per java virtual machine.maxInstancesPerZone(String zone, int maxInstancesPerZone) Sets the maximum number of instances per zone.Sets the processing unit name that will be deployed.numberOfBackups(int numberOfBackups) Sets the number of backups that will be deployed as part of this processing unit.numberOfInstances(int numberOfInstances) Sets the number of instances that will be deployed as part of this processing unit instance.partitioned(int numberOfParitions, int numberOfBackups) A convenient method allowing to easily configure the space deployment to deploy a partitioned topology withnumberOfParitionsinstances each withnumberOfBackups.primaryZone(String zone) Set the preferred zones for primary instances.replicated(boolean async, int numberOfInstances) A convenient method allowing to easily configure the space deployment to deploy a replicated (either sync or async) topology withnumberOfInstancesinstances.requiresIsolation(boolean requiresIsolation) secured(boolean secured) Will deploy a secured processing unit.setContextProperty(String key, String value) Sets a context deploy time property overriding any${...}defined within a processing unit configuration.voidsetDependencies(ProcessingUnitDependencies<ProcessingUnitDependency> dependencies) setEnvironmentVariable(String key, String value) slaLocation(File slaLocation) Sets an external SLA definition location to be loaded.slaLocation(String slaLocation) Sets an external SLA definition location to be loaded.userDetails(UserDetails userDetails) Sets the security user details for authentication and authorization of the processing unit.userDetails(String userName, String password) Sets the username and password (effectively making the processing unit secured) for the processing unit deployment.
-
Constructor Details
-
ProcessingUnitDeployment
Constructs a processing unit deployment based on the specified processing unit name (should exists under the[GS ROOT]/deploydirectory. -
ProcessingUnitDeployment
Constructs a processing unit deployment based on the specified processing unit file path (points either to a processing unit jar/zip file or a directory).
-
-
Method Details
-
getProcessingUnit
Deprecated.Returns the processing unit that will be deployed. UseProcessingUnitConfig.getProcessingUnit()instead -
name
Sets the processing unit name that will be deployed. By default it will be based on the parameter passed in the constructor. -
partitioned
A convenient method allowing to easily configure the space deployment to deploy a partitioned topology withnumberOfParitionsinstances each withnumberOfBackups.Exactly the same like calling
clusterSchema("partitioned"), followed bynumberOfInstances(numberOfParitions)andnumberOfBackups(numberOfBackups).- Parameters:
numberOfParitions- The number of partitionsnumberOfBackups- The number of backups- Returns:
- This space deployment
-
replicated
A convenient method allowing to easily configure the space deployment to deploy a replicated (either sync or async) topology withnumberOfInstancesinstances.Exactly the same like calling
clusterSchema("sync_replicated")orclusterSchema("async_replicated"), followed bynumberOfInstances(numberOfInstances)andnumberOfBackups(0).- Parameters:
numberOfInstances- The number of instances to form the replicated space- Returns:
- This space deployment
-
clusterSchema
Controls the cluster schema of the deployment. Only make sense to set it when there is an embedded space defined within the processing unit. -
numberOfInstances
Sets the number of instances that will be deployed as part of this processing unit instance. In case of partitioned, defines the number of partitions. -
numberOfBackups
Sets the number of backups that will be deployed as part of this processing unit. Only applicable when the processing unit has an embedded space. -
requiresIsolation
- Parameters:
requiresIsolation- set true if isolation is required per virtual machine. No processing unit instances can run on the same virtual machine. Default false.- Since:
- 10.1.0
-
maxInstancesPerVM
Sets the maximum number of instances per java virtual machine.On partitioned topology with backups topology, controls that a primary and a backup won't run on the same java virtual machine if set to
1.On a non partitioned with backups topology, controls the maximum number of instances running on the same java virtual machine.
-
maxInstancesPerMachine
Sets the maximum number of instances per machine.On partitioned topology with backups topology, controls that a primary and a backup won't run on the same machine if set to
1.On a non partitioned with backups topology, controls the maximum number of instances running on the same machine.
-
maxInstancesPerZone
Sets the maximum number of instances per zone.On partitioned topology with backups topology, controls that a primary and a backup won't run on the same zone if set to
1. Note, for each zone this will have to be set.On a non partitioned with backups topology, controls the maximum number of instances running on the same zone.
-
addZone
Adds a zone where the processing unit is allowed to be deployed on. -
Set the preferred zones for primary instances.
-
addPrimaryZone
Adds a preferred zone for primary instances. -
setContextProperty
Sets a context deploy time property overriding any${...}defined within a processing unit configuration. -
setEnvironmentVariable
-
secured
Will deploy a secured processing unit. Note, by setting user details the processing unit will be secured automatically.- Specified by:
securedin interfaceProcessingUnitDeploymentTopology
-
userDetails
Sets the security user details for authentication and authorization of the processing unit.- Specified by:
userDetailsin interfaceProcessingUnitDeploymentTopology
-
slaLocation
Sets an external SLA definition location to be loaded. -
slaLocation
Sets an external SLA definition location to be loaded. -
userDetails
Sets the username and password (effectively making the processing unit secured) for the processing unit deployment.- Specified by:
userDetailsin interfaceProcessingUnitDeploymentTopology
-
isSecured
-
getUserDetails
Deprecated.UseProcessingUnitConfig.getUserDetails()instead -
addDependencies
public ProcessingUnitDeployment addDependencies(ProcessingUnitDetailedDependencies<? extends ProcessingUnitDependency> detailedDependencies) Postpones deployment of processing unit instances until the specified dependencies are met. The following example postpones the deployment of this processing unit until B has completed the deployment and C has at least one instance deployed. deployment.addDependencies(new ProcessingUnitDeploymentDependenciesConfigurer().dependsOnDeployment("B").dependsOnMinimumNumberOfDeployedInstances("C",1).create())- Specified by:
addDependenciesin interfaceProcessingUnitDeploymentTopology- Since:
- 8.0.6
- See Also:
-
addDependency
Postpones deployment of processing unit instances deployment until the specified processing unit deployment is complete. Same as: deployment.addDependencies(new ProcessingUnitDeploymentDependenciesConfigurer().dependsOnDeployment(requiredProcessingUnitName).create())- Specified by:
addDependencyin interfaceProcessingUnitDeploymentTopology- Since:
- 8.0.6
-
getDeploymentOptions
Deprecated.Transforms this deployment into a set of deployment options. UseProcessingUnitConfig.toDeploymentOptions() -
setDependencies
-
create
Description copied from interface:ProcessingUnitDeploymentTopologyConverts this fluent API object to a lazy implementation of ProcessingUnitConfig- Specified by:
createin interfaceProcessingUnitDeploymentTopology
-