Created
February 11, 2016 00:10
-
-
Save mattyb149/1e32b1b2fec49ccd5deb to your computer and use it in GitHub Desktop.
Groovy script to seed Hazelcast instance for ExecuteScript example
This file contains 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
@Grab(group='com.hazelcast', module='hazelcast', version='3.6') | |
@Grab(group='com.hazelcast', module='hazelcast-client', version='3.6') | |
import com.hazelcast.client.* | |
import com.hazelcast.client.config.* | |
import com.hazelcast.core.* | |
ClientConfig clientConfig = new ClientConfig(); | |
clientConfig.getGroupConfig().setName("dev").setPassword("dev-pass"); | |
clientConfig.getNetworkConfig().addAddress("192.168.99.100", "192.168.99.100:32780"); | |
client = HazelcastClient.newHazelcastClient(clientConfig) | |
client.getMap("customers").put('mattyb149', ['name': 'Matt Burgess', 'email': 'mattyb149@gmail.com', 'blog': 'funnifi.blogspot.com']) | |
client.getMap("customers").put('nifi', ['name': 'Apache NiFi', 'email': 'nifi@apache.org', 'blog': 'nifi.apache.org']) | |
client?.shutdown() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment