GigaSpaces XAP 7.1 API

org.openspaces.admin.esm.deployment
Class ElasticDataGridDeployment

java.lang.Object
  extended by org.openspaces.admin.esm.deployment.InternalElasticDataGridDeployment
      extended by org.openspaces.admin.esm.deployment.ElasticDataGridDeployment
All Implemented Interfaces:
Serializable

public class ElasticDataGridDeployment
extends InternalElasticDataGridDeployment

An elastic data-grid deployment descriptor for deploying a plain data-grid.

The data-grid context properties can be modified by addContextProperty(String, String). The default is a Highly-available data-grid, consisting of 1-10 gigabytes of memory spanned across a partitioned cluster of 10,1. Each Grid Service Container JVM is set to -Xms512m and -Xmx512m.

 Disclaimer: This interface and the elastic data grid functionality is provided as a technology preview in XAP 7.1. 
 As such, it is subject to API and behavior changes in the next XAP releases without going through the usual deprecation process 
 of the XAP API.
 

See Also:
Serialized Form

Constructor Summary
ElasticDataGridDeployment(String dataGridName)
          Constructs an Elastic data-grid with the specified name.
 
Method Summary
 ElasticDataGridDeployment addContextProperty(String key, String value)
          Adds a context deploy time property overriding any ${...}
 ElasticDataGridDeployment addSla(SLA sla)
          Adds an SLA to monitor and auto-scale if necessary.
 ElasticDataGridDeployment capacity(String minMemory, String maxMemory)
          Set the memory capacity growth of this data grid.
 ElasticDataGridDeployment dedicatedDeploymentIsolation()
          Restrict this data-grid deployment to machines not shared by other deployments.
 ElasticDataGridDeployment elasticScaleHandler(ElasticScaleHandlerConfig config)
          Set an ElasticScaleHandler implementation configuration.
 Properties getContextProperties()
           
 ElasticScaleHandlerConfig getElasticScaleHandlerConfig()
           
 ElasticDataGridDeployment highlyAvailable(boolean enabled)
          Set the availability of the data grid.
 ElasticDataGridDeployment initialJavaHeapSize(String size)
          Sets the initial Java heap size (the JVM -Xms argument) of a container hosting a processing unit.
 ElasticDataGridDeployment maximumJavaHeapSize(String size)
          Sets the maximum Java heap size (the JVM -Xmx argument) of a container hosting a processing unit.
 ElasticDataGridDeployment publicDeploymentIsolation()
          Allow this data-grid deployment to co-exist and share the same machine resources with other deployments.
 ElasticDataGridDeployment setPartitions(int numberOfPartitions)
          Sets the number of partitions to use (number of primaries if highly available).
 ElasticDataGridDeployment sharedDeploymentIsolation(String tenant)
          Allow this data-grid deployment to co-exist and share the same machine resources with other deployments of this tenant - only.
 ElasticDataGridDeployment vmInputArgument(String vmInputArgument)
          Adds a single JVM level argument to the container hosting a processing unit.
 
Methods inherited from class org.openspaces.admin.esm.deployment.InternalElasticDataGridDeployment
getDataGridName, getDeploymentContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ElasticDataGridDeployment

public ElasticDataGridDeployment(String dataGridName)
Constructs an Elastic data-grid with the specified name.

Parameters:
dataGridName - The data-grid name.
Method Detail

dedicatedDeploymentIsolation

public ElasticDataGridDeployment dedicatedDeploymentIsolation()
Restrict this data-grid deployment to machines not shared by other deployments.


publicDeploymentIsolation

public ElasticDataGridDeployment publicDeploymentIsolation()
Allow this data-grid deployment to co-exist and share the same machine resources with other deployments.


sharedDeploymentIsolation

public ElasticDataGridDeployment sharedDeploymentIsolation(String tenant)
Allow this data-grid deployment to co-exist and share the same machine resources with other deployments of this tenant - only.

Parameters:
tenant - A name representing the tenant.

capacity

public ElasticDataGridDeployment capacity(String minMemory,
                                          String maxMemory)
Set the memory capacity growth of this data grid. The parameter specifies size in bytes (b), kilobytes (k), megabytes (m), gigabytes (g). These two control respectively -Xms and -Xmx of the Grid Service Container JVM. Default it "1g"-"10g".

Parameters:
minMemory - minimum memory initially held for this data grid; Default "1g".
maxMemory - maximum memory to allocate for this data grid; Default "10g".

highlyAvailable

public ElasticDataGridDeployment highlyAvailable(boolean enabled)
Set the availability of the data grid. A highly available data grid is one that has at least one backup copy per primary, for failing over to.

Parameters:
enabled - true if data grid is highly available; false if the data is recoverable from some storage. Default is true.

initialJavaHeapSize

public ElasticDataGridDeployment initialJavaHeapSize(String size)
Sets the initial Java heap size (the JVM -Xms argument) of a container hosting a processing unit. For performance optimization you should have the initial heap size the same as the maximum size.

Parameters:
size - The heap size in kilobytes (k), megabytes (m), gigabytes (g); Default "512m".

maximumJavaHeapSize

public ElasticDataGridDeployment maximumJavaHeapSize(String size)
Sets the maximum Java heap size (the JVM -Xmx argument) of a container hosting a processing unit. In many cases the heap size is determined based on the operating system: for a 32-bit OS, a 2 GB maximum heap size is recommended, and for a 64-bit OS, a 6-10 MB maximum heap size is recommended.

If set below the initialJavaHeapSize(String) then the -Xms setting will correspond to the -Xmx setting.

Parameters:
size - The heap size in kilobytes (k), megabytes (m), gigabytes (g); Default "512m".

vmInputArgument

public ElasticDataGridDeployment vmInputArgument(String vmInputArgument)
Adds a single JVM level argument to the container hosting a processing unit. Note that the initialJavaHeapSize(String) and maximumJavaHeapSize(String) already define the -Xms and -Xmx vm arguments.


addContextProperty

public ElasticDataGridDeployment addContextProperty(String key,
                                                    String value)
Adds a context deploy time property overriding any ${...} defined within a processing unit configuration.


setPartitions

public ElasticDataGridDeployment setPartitions(int numberOfPartitions)
Sets the number of partitions to use (number of primaries if highly available). This setting will override the default calculated value for the number of partitions derived from the capacity(String, String) parameters.

Parameters:
numberOfPartitions - The number of partitions required.

getContextProperties

public Properties getContextProperties()
Returns:
The context deploy time properties.

addSla

public ElasticDataGridDeployment addSla(SLA sla)
Adds an SLA to monitor and auto-scale if necessary.

Parameters:
sla - an SLA descriptor
See Also:
MemorySla

elasticScaleHandler

public ElasticDataGridDeployment elasticScaleHandler(ElasticScaleHandlerConfig config)
Set an ElasticScaleHandler implementation configuration. The scale-handler (and its state) is per-deployment. The scale-handler API will be called upon when need of a GSC (either on an available machine, or a new machine)

Parameters:
config - The elastic scale handler configuration

getElasticScaleHandlerConfig

public ElasticScaleHandlerConfig getElasticScaleHandlerConfig()
Returns:
The elastic scale handler configuration

GigaSpaces XAP 7.1 API

Copyright © GigaSpaces.