Last active
December 14, 2015 08:49
-
-
Save ahodroj/5060718 to your computer and use it in GitHub Desktop.
Starts an elastic in-memory data grid in XAP running with ESM
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.openspaces.admin.* | |
import org.openspaces.admin.pu.elastic.config.ManualCapacityScaleConfigurer | |
import org.openspaces.admin.space.ElasticSpaceDeployment | |
import org.openspaces.core.util.MemoryUnit | |
println "Starting Elastic In-Memory Data Grid..." | |
pu = new AdminFactory().addGroup("ahodroj").createAdmin().gridServiceManagers.waitForAtLeastOne().deploy( | |
new ElasticSpaceDeployment("mySpace") | |
.memoryCapacityPerContainer(128, MemoryUnit.MEGABYTES).maxMemoryCapacity(2048, MemoryUnit.MEGABYTES) | |
.singleMachineDeployment() | |
// initial scale | |
.scale( | |
new ManualCapacityScaleConfigurer() | |
.memoryCapacity(512, MemoryUnit.MEGABYTES) | |
.create() | |
) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment