Last active
July 1, 2016 11:44
-
-
Save jackeylu/63143cbada55c0de25884b233b56b037 to your computer and use it in GitHub Desktop.
An Ignite client to do simple put operations.
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
public class IgniteClientSimplePut { | |
public static void main(String[] args) { | |
Ignition.setClientMode(true); | |
try (Ignite ignite = Ignition.start(args[0])){ | |
String cache_name = "ignite-cache"; | |
IgniteCache cache = ignite.getOrCreateCache(cache_name); | |
new CacheOperations().putOperations(ignite, cache_name, Integer.valueOf(args[1])); | |
System.out.println("Cache size: "+cache.size()); | |
ignite.destroyCache(cache_name); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment