Skip to content

Instantly share code, notes, and snippets.

@iliapolo
Created May 2, 2015 12:52
Show Gist options
  • Save iliapolo/6cf296a1f9030279eca7 to your computer and use it in GitHub Desktop.
Save iliapolo/6cf296a1f9030279eca7 to your computer and use it in GitHub Desktop.
Deployment example for an ElasticSpace (Elastic Service Manager - GigaSpaces)
Admin admin = new AdminFactory().addGroup("elip-xap").createAdmin();
GridServiceManager gsm = admin.getGridServiceManagers().waitForAtLeastOne();
ElasticSpaceDeployment deployment = new ElasticSpaceDeployment("mySpace");
// deploy a 4,1 cluster.
// this should be default use just 2 containers
deployment.memoryCapacityPerContainer(32, MemoryUnit.MEGABYTES);
deployment.maxMemoryCapacity(256, MemoryUnit.MEGABYTES);
deployment.minNumberOfCpuCoresPerMachine(1);
deployment.maxNumberOfCpuCores(8);
gsm.deploy(deployment);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment