GigaSpaces XAP 10.0.1 API

org.openspaces.admin.memcached
Class MemcachedDeployment

java.lang.Object
  extended by org.openspaces.admin.memcached.MemcachedDeployment
All Implemented Interfaces:
ProcessingUnitDeploymentTopology

public class MemcachedDeployment
extends Object
implements ProcessingUnitDeploymentTopology

A deployment of a pure memcached processing unit (comes built in under [GS ROOT]/deploy/templates/memcached).

Author:
kimchy
See Also:
GridServiceManager.deploy(org.openspaces.admin.memcached.MemcachedDeployment), GridServiceManagers.deploy(org.openspaces.admin.memcached.MemcachedDeployment)

Constructor Summary
MemcachedDeployment(String spaceUrl)
          Constructs a new Space deployment with the space name that will be created (it will also be the processing unit name).
 
Method Summary
 MemcachedDeployment addDependencies(org.openspaces.admin.internal.pu.dependency.ProcessingUnitDetailedDependencies<? extends ProcessingUnitDependency> deploymentDependencies)
          Postpones deployment of processing unit instances until the specified dependencies are met.
 MemcachedDeployment addDependency(String requiredProcessingUnitName)
          Postpones deployment of processing unit instances deployment until the specified processing unit deployment is complete.
 MemcachedDeployment addZone(String zone)
          Adds a zone where the processing unit is allowed to be deployed on.
 MemcachedDeployment clusterSchema(String clusterSchema)
          Sets the cluster schema of the Space.
 ProcessingUnitConfigHolder create()
          Converts this fluent API object to a lazy implementation of ProcessingUnitConfig
 String getSpaceUrl()
          Returns the Space url of the config.
 MemcachedDeployment maxInstancesPerMachine(int maxInstancesPerMachine)
          Sets the maximum number of instances per machine.
 MemcachedDeployment maxInstancesPerVM(int maxInstancesPerVM)
          Sets the maximum number of instances per virtual machine.
 MemcachedDeployment maxInstancesPerZone(String zone, int maxInstancesPerZone)
          Sets the maximum number of instances per zone.
 MemcachedDeployment numberOfBackups(int numberOfBackups)
          Sets the number of backups per instance of the space config.
 MemcachedDeployment numberOfInstances(int numberOfInstances)
          Sets the number of instances of the space config.
 MemcachedDeployment 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.
 MemcachedDeployment 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.
 MemcachedDeployment secured(boolean secured)
          Will deploy a secured space.
 MemcachedDeployment setContextProperty(String key, String value)
          Sets a context deploy time property overriding any ${...}
 MemcachedDeployment slaLocation(File slaLocation)
          Sets an external SLA definition location to be loaded.
 MemcachedDeployment slaLocation(String slaLocation)
          Sets an external SLA definition location to be loaded.
 MemcachedDeployment userDetails(String userName, String password)
          Sets the username and password (effectively making the processing unit secured) for the processing unit config.
 MemcachedDeployment userDetails(UserDetails userDetails)
          Advance: Sets the security user details for authentication and autherization of the processing unit.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MemcachedDeployment

public MemcachedDeployment(String spaceUrl)
Constructs a new Space deployment with the space name that will be created (it will also be the processing unit name).

Method Detail

getSpaceUrl

public String getSpaceUrl()
Returns the Space url of the config.


partitioned

public MemcachedDeployment 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.

Exactly the same like calling clusterSchema("partitioned-sync2backup"), followed by numberOfInstances(numberOfParitions) and numberOfBackups(numberOfBackups).

Parameters:
numberOfParitions - The number of partitions
numberOfBackups - The number of backups
Returns:
This space deployment

replicated

public MemcachedDeployment 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.

Exactly the same like calling clusterSchema("sync_replicated") or clusterSchema("async_replicated"), followed by numberOfInstances(numberOfInstances) and numberOfBackups(0).

Parameters:
numberOfInstances - The number of instances to form the replicated space
Returns:
This space deployment

clusterSchema

public MemcachedDeployment clusterSchema(String clusterSchema)
Sets the cluster schema of the Space.

See Also:
partitioned(int, int)

numberOfInstances

public MemcachedDeployment numberOfInstances(int numberOfInstances)
Sets the number of instances of the space config.


numberOfBackups

public MemcachedDeployment numberOfBackups(int numberOfBackups)
Sets the number of backups per instance of the space config.


maxInstancesPerVM

public MemcachedDeployment maxInstancesPerVM(int 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

public MemcachedDeployment maxInstancesPerMachine(int 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

public MemcachedDeployment maxInstancesPerZone(String zone,
                                               int 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

public MemcachedDeployment addZone(String zone)
Adds a zone where the processing unit is allowed to be deployed on.


setContextProperty

public MemcachedDeployment setContextProperty(String key,
                                              String value)
Sets a context deploy time property overriding any ${...} defined within a processing unit configuration.


secured

public MemcachedDeployment secured(boolean secured)
Will deploy a secured space. Note, by setting user details the space will be secured automatically.

Specified by:
secured in interface ProcessingUnitDeploymentTopology

userDetails

public MemcachedDeployment userDetails(UserDetails userDetails)
Advance: Sets the security user details for authentication and autherization of the processing unit.

Specified by:
userDetails in interface ProcessingUnitDeploymentTopology

userDetails

public MemcachedDeployment userDetails(String userName,
                                       String password)
Sets the username and password (effectively making the processing unit secured) for the processing unit config.

Specified by:
userDetails in interface ProcessingUnitDeploymentTopology

slaLocation

public MemcachedDeployment slaLocation(String slaLocation)
Sets an external SLA definition location to be loaded.


slaLocation

public MemcachedDeployment slaLocation(File slaLocation)
Sets an external SLA definition location to be loaded.


addDependencies

public MemcachedDeployment addDependencies(org.openspaces.admin.internal.pu.dependency.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:
addDependencies in interface ProcessingUnitDeploymentTopology
Since:
8.0.6
See Also:
ProcessingUnitDeploymentDependenciesConfigurer

addDependency

public MemcachedDeployment addDependency(String requiredProcessingUnitName)
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:
addDependency in interface ProcessingUnitDeploymentTopology
Since:
8.0.6

create

public ProcessingUnitConfigHolder create()
Description copied from interface: ProcessingUnitDeploymentTopology
Converts this fluent API object to a lazy implementation of ProcessingUnitConfig

Specified by:
create in interface ProcessingUnitDeploymentTopology

GigaSpaces XAP 10.0.1 API

Copyright © GigaSpaces.