rediscala 介绍
rediscala 是 Redis 的 Scala 非堵塞客户端开发包,支持异步 I/O
操作。
示例代码:
import redis.RedisClient import scala.concurrent.Await import scala.concurrent.duration._ import scala.concurrent.ExecutionContext.Implicits.global object Main extends App { implicit val akkaSystem = akka.actor.ActorSystem() val redis = RedisClient() val futurePong = redis.ping() println("Ping sent!") futurePong.map(pong => { println(s"Redis replied with a $pong") }) Await.result(futurePong, 5 seconds) akkaSystem.shutdown() }
rediscala 官网
https://github.com/etaty/rediscala
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。