Redis的Scala客户端:rediscala

jopen 11年前

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()  }

项目主页:http://www.open-open.com/lib/view/home/1376614407569