Jedis是Redis官方首选的Java客户端开发包。
实例方法:
import redis.clients.jedis.*Jedis jedis = new Jedis("localhost");jedis.set("foo", "bar");String value = jedis.get("foo");支持的特效:
Sorting
Connectionhandling
Commandsoperatingonanykindofvalues
Commandsoperatingonstringvalues
Commandsoperatingonhashes
Commandsoperatingonlists
Commandsoperatingonsets
Commandsoperatingonsortedsets
Transactions
Pipelining
Publish/Subscribe
Persistencecontrolcommands
Remoteservercontrolcommands
Connectionpooling
Sharding(MD5,MurmurHash)
Key-tagsforsharding
Shardingwithpipelining
Scriptingwithpipelining
Maven:
redis.clients jedis 2.0.0 jar compileAPI文档:https://tool.oschina.net/apidocs/apidoc?api=jedis-2.1.0
评论