Class SpaceDeployment
- All Implemented Interfaces:
ProcessingUnitDeploymentTopology
Space processing unit (comes built in
under [GS ROOT]/deploy/templates/datagrid).- Author:
- kimchy
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionSpaceDeployment(String spaceName) Constructs a new Space deployment with the space name that will be created (it will also be the processing unit name). -
Method Summary
Modifier and TypeMethodDescriptionaddDependencies(ProcessingUnitDetailedDependencies<? extends ProcessingUnitDependency> deploymentDependencies) 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.Adds a zone where the processing unit is allowed to be deployed on.clusterSchema(String clusterSchema) Sets the cluster schema of the Space.create()Converts this fluent API object to a lazy implementation of ProcessingUnitConfigDeprecated.maxInstancesPerMachine(int maxInstancesPerMachine) Sets the maximum number of instances per machine.maxInstancesPerVM(int maxInstancesPerVM) Sets the maximum number of instances per virtual machine.maxInstancesPerZone(String zone, int maxInstancesPerZone) Sets the maximum number of instances per zone.numberOfBackups(int numberOfBackups) Sets the number of backups per instance of the space config.setnumberOfInstances(int numberOfInstances) Sets the number of instances of the space config.setpartitioned(int numberOfPartitions, 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 primary zone where the processing unit is allowed to be deployed on.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 space.setContextProperty(String key, String value) Sets a context deploy time property overriding any${...}defined within a processing unit configuration.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) Advance: Sets the security user details for authentication and autherization of the processing unit.userDetails(String userName, String password) Sets the user name and password (effectively making the processing unit secured) for the processing unit config.set
-
Constructor Details
-
SpaceDeployment
Constructs a new Space deployment with the space name that will be created (it will also be the processing unit name).
-
-
Method Details
-
getSpaceName
Deprecated.Returns the Space name of the config.set UseSpaceConfig.getName()instead -
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:
numberOfPartitions- 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
Sets the cluster schema of the Space.- See Also:
-
numberOfInstances
Sets the number of instances of the space config.set -
numberOfBackups
Sets the number of backups per instance of the space config.set -
requiresIsolation
-
maxInstancesPerVM
Sets the maximum number of instances per virtual machine.On partitioned topology with backups topology, controls that a primary and a backup won't run on the same virtual machine if set to
1.On a non partitioned with backups topology, controls the maximum number of instances running on the same 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 primary zone where the processing unit is allowed to be deployed on.
-
setContextProperty
Sets a context deploy time property overriding any${...}defined within a processing unit configuration. -
setEnvironmentVariable
-
secured
Will deploy a secured space. Note, by setting user details the space will be secured automatically.- Specified by:
securedin interfaceProcessingUnitDeploymentTopology
-
userDetails
Advance: Sets the security user details for authentication and autherization of the processing unit.- Specified by:
userDetailsin interfaceProcessingUnitDeploymentTopology
-
userDetails
Sets the user name and password (effectively making the processing unit secured) for the processing unit config.set- Specified by:
userDetailsin interfaceProcessingUnitDeploymentTopology
-
slaLocation
Sets an external SLA definition location to be loaded. -
slaLocation
Sets an external SLA definition location to be loaded. -
addDependencies
public SpaceDeployment addDependencies(ProcessingUnitDetailedDependencies<? extends ProcessingUnitDependency> deploymentDependencies) 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. config.setaddDependencies(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: config.setaddDependencies(new ProcessingUnitDeploymentDependenciesConfigurer().dependsOnDeployment(requiredProcessingUnitName).create())- Specified by:
addDependencyin interfaceProcessingUnitDeploymentTopology- Since:
- 8.0.6
-
create
Description copied from interface:ProcessingUnitDeploymentTopologyConverts this fluent API object to a lazy implementation of ProcessingUnitConfig- Specified by:
createin interfaceProcessingUnitDeploymentTopology
-