Created
July 6, 2015 18:14
-
-
Save volnoboy/08732e56473641340cf6 to your computer and use it in GitHub Desktop.
Simple Redis project
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
//<dependency> | |
// <groupId>redis.clients</groupId> | |
// <artifactId>jedis</artifactId> | |
// <version>2.7.0</version> | |
//</dependency> | |
public class Redis { | |
public static String a = "a"; | |
public static void main(String[] args) { | |
Jedis jedis = new Jedis("localhost"); | |
jedis.set("Israel", "Jerusalem"); | |
jedis.set("China", "Beijing"); | |
System.out.println(jedis.get("Israel")); | |
System.out.println(new Date()); | |
for(int i= 0; i<10000; i++) { | |
jedis.set(RandomStringUtils.randomAlphabetic(100), RandomStringUtils.randomAlphabetic(100)); | |
} | |
System.out.println(new Date()); | |
System.out.println(a); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment