3 import com.redis.operations._
10 class Redis(val host: String, val port: Int) extends Operations with ListOperations with SetOperations with NodeOperations with KeySpaceOperations with SortOperations {
12 // auxiliary constructor
13 def this() = this("localhost", 6379)
15 // Points to the connection to a server instance
16 val connection = Connection(host, port)
19 // Connect and Disconnect to the Redis server
20 def connect = connection.connect
21 def disconnect = connection.disconnect
22 def connected: Boolean = connection.connected
24 // Establish the connection to the server instance on initialize
27 // Get Redis Client connection.
28 def getConnection(key: String) = getConnection
29 def getConnection = connection
31 // Outputs a formatted representation of the Redis server.
32 override def toString = connection.host+":"+connection.port+" <connected:"+connection.connected+">"