public class ProcessingUnitDeployment extends Object implements ProcessingUnitDeploymentTopology
GridServiceManager.deploy(ProcessingUnitDeployment)
,
GridServiceManagers.deploy(ProcessingUnitDeployment)
Constructor and Description |
---|
ProcessingUnitDeployment(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]/deploy directory. |
Modifier and Type | Method and Description |
---|---|
ProcessingUnitDeployment |
addDependencies(ProcessingUnitDetailedDependencies<? extends ProcessingUnitDependency> detailedDependencies)
Postpones deployment of processing unit instances until the specified dependencies are met.
|
ProcessingUnitDeployment |
addDependency(String requiredProcessingUnitName)
Postpones deployment of processing unit instances deployment until the specified processing
unit deployment is complete.
|
ProcessingUnitDeployment |
addPrimaryZone(String primaryZone)
Adds a preferred zone for primary instances.
|
ProcessingUnitDeployment |
addZone(String zone)
Adds a zone where the processing unit is allowed to be deployed on.
|
ProcessingUnitDeployment |
clusterSchema(String clusterSchema)
Controls the cluster schema of the deployment.
|
ProcessingUnitConfigHolder |
create()
Converts this fluent API object to a lazy implementation of ProcessingUnitConfig
|
String[] |
getDeploymentOptions()
Deprecated.
|
Map<String,String> |
getElasticProperties()
Deprecated.
|
String |
getProcessingUnit()
Deprecated.
|
UserDetails |
getUserDetails()
Deprecated.
|
Boolean |
isSecured() |
ProcessingUnitDeployment |
maxInstancesPerMachine(int maxInstancesPerMachine)
Sets the maximum number of instances per machine.
|
ProcessingUnitDeployment |
maxInstancesPerVM(int maxInstancesPerVM)
Sets the maximum number of instances per java virtual machine.
|
ProcessingUnitDeployment |
maxInstancesPerZone(String zone,
int maxInstancesPerZone)
Sets the maximum number of instances per zone.
|
ProcessingUnitDeployment |
name(String name)
Sets the processing unit name that will be deployed.
|
ProcessingUnitDeployment |
numberOfBackups(int numberOfBackups)
Sets the number of backups that will be deployed as part of this processing unit.
|
ProcessingUnitDeployment |
numberOfInstances(int numberOfInstances)
Sets the number of instances that will be deployed as part of this processing unit instance.
|
ProcessingUnitDeployment |
partitioned(int numberOfParitions,
int numberOfBackups)
A convenient method allowing to easily configure the space deployment to deploy a partitioned
topology with
numberOfParitions instances each with
numberOfBackups . |
ProcessingUnitDeployment |
primaryZone(String zone)
Set the preferred zones for primary instances.
|
ProcessingUnitDeployment |
replicated(boolean async,
int numberOfInstances)
A convenient method allowing to easily configure the space deployment to deploy a replicated
(either sync or async) topology with
numberOfInstances instances. |
ProcessingUnitDeployment |
requiresIsolation(boolean requiresIsolation) |
ProcessingUnitDeployment |
secured(boolean secured)
Will deploy a secured processing unit.
|
ProcessingUnitDeployment |
setContextProperty(String key,
String value)
Sets a context deploy time property overriding any
${...} defined within a
processing unit configuration. |
void |
setDependencies(ProcessingUnitDependencies<ProcessingUnitDependency> dependencies) |
ProcessingUnitDeployment |
setElasticProperty(String key,
String value) |
ProcessingUnitDeployment |
slaLocation(File slaLocation)
Sets an external SLA definition location to be loaded.
|
ProcessingUnitDeployment |
slaLocation(String slaLocation)
Sets an external SLA definition location to be loaded.
|
ProcessingUnitDeployment |
userDetails(String userName,
String password)
Sets the username and password (effectively making the processing unit secured) for the
processing unit deployment.
|
ProcessingUnitDeployment |
userDetails(UserDetails userDetails)
Sets the security user details for authentication and authorization of the processing unit.
|
public ProcessingUnitDeployment(String processingUnitName)
[GS ROOT]/deploy
directory.public ProcessingUnitDeployment(File processingUnit)
@Deprecated public String getProcessingUnit()
ProcessingUnitConfig.getProcessingUnit()
insteadpublic ProcessingUnitDeployment name(String name)
public ProcessingUnitDeployment partitioned(int numberOfParitions, int numberOfBackups)
numberOfParitions
instances each with
numberOfBackups
.
Exactly the same like calling clusterSchema("partitioned")
, followed by
numberOfInstances(numberOfParitions)
and numberOfBackups(numberOfBackups)
.
numberOfParitions
- The number of partitionsnumberOfBackups
- The number of backupspublic ProcessingUnitDeployment replicated(boolean async, int numberOfInstances)
numberOfInstances
instances.
Exactly the same like calling clusterSchema("sync_replicated")
or
clusterSchema("async_replicated")
, followed by numberOfInstances(numberOfInstances)
and numberOfBackups(0)
.
numberOfInstances
- The number of instances to form the replicated spacepublic ProcessingUnitDeployment clusterSchema(String clusterSchema)
public ProcessingUnitDeployment numberOfInstances(int numberOfInstances)
public ProcessingUnitDeployment numberOfBackups(int numberOfBackups)
public ProcessingUnitDeployment requiresIsolation(boolean requiresIsolation)
requiresIsolation
- set true if isolation is required per virtual machine. No processing
unit instances can run on the same virtual machine. Default false.public ProcessingUnitDeployment maxInstancesPerVM(int maxInstancesPerVM)
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.
public ProcessingUnitDeployment maxInstancesPerMachine(int maxInstancesPerMachine)
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.
public ProcessingUnitDeployment maxInstancesPerZone(String zone, int maxInstancesPerZone)
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.
public ProcessingUnitDeployment addZone(String zone)
public ProcessingUnitDeployment primaryZone(String zone)
public ProcessingUnitDeployment addPrimaryZone(String primaryZone)
public ProcessingUnitDeployment setContextProperty(String key, String value)
${...}
defined within a
processing unit configuration.public ProcessingUnitDeployment secured(boolean secured)
secured
in interface ProcessingUnitDeploymentTopology
public ProcessingUnitDeployment userDetails(UserDetails userDetails)
userDetails
in interface ProcessingUnitDeploymentTopology
public ProcessingUnitDeployment slaLocation(String slaLocation)
public ProcessingUnitDeployment slaLocation(File slaLocation)
public ProcessingUnitDeployment userDetails(String userName, String password)
userDetails
in interface ProcessingUnitDeploymentTopology
public Boolean isSecured()
@Deprecated public UserDetails getUserDetails()
ProcessingUnitConfig.getUserDetails()
insteadpublic ProcessingUnitDeployment addDependencies(ProcessingUnitDetailedDependencies<? extends ProcessingUnitDependency> detailedDependencies)
addDependencies
in interface ProcessingUnitDeploymentTopology
ProcessingUnitDeploymentDependenciesConfigurer
public ProcessingUnitDeployment addDependency(String requiredProcessingUnitName)
addDependency
in interface ProcessingUnitDeploymentTopology
@Deprecated public String[] getDeploymentOptions()
ProcessingUnitConfig.toDeploymentOptions()
public ProcessingUnitDeployment setElasticProperty(String key, String value)
public void setDependencies(ProcessingUnitDependencies<ProcessingUnitDependency> dependencies)
@Deprecated public Map<String,String> getElasticProperties()
ProcessingUnitConfig.getElasticProperties()
insteadpublic ProcessingUnitConfigHolder create()
ProcessingUnitDeploymentTopology
create
in interface ProcessingUnitDeploymentTopology
Copyright © GigaSpaces.