Class: Lite::Redis::Connection
- Inherits:
-
Base
- Object
- Base
- Lite::Redis::Connection
show all
- Defined in:
- lib/lite/redis/connection.rb
Instance Attribute Summary
Attributes inherited from Base
#client
Instance Method Summary
collapse
Methods inherited from Base
#initialize, method_missing, #respond_to_method?, #respond_to_missing?
Instance Method Details
#authenticate(password) ⇒ Object
7
8
9
|
# File 'lib/lite/redis/connection.rb', line 7
def authenticate(password)
client.auth(password)
end
|
#connected? ⇒ Boolean
11
12
13
|
# File 'lib/lite/redis/connection.rb', line 11
def connected?
client.connected?
end
|
#database(index) ⇒ Object
15
16
17
|
# File 'lib/lite/redis/connection.rb', line 15
def database(index)
client.select(index)
end
|
#database_id ⇒ Object
19
20
21
|
# File 'lib/lite/redis/connection.rb', line 19
def database_id
client.database_id
end
|
#database_size ⇒ Object
23
24
25
|
# File 'lib/lite/redis/connection.rb', line 23
def database_size
client.dbsize
end
|
#debug(*args) ⇒ Object
27
28
29
|
# File 'lib/lite/redis/connection.rb', line 27
def debug(*args)
client.debug(*args)
end
|
#disconnect ⇒ Object
31
32
33
|
# File 'lib/lite/redis/connection.rb', line 31
def disconnect
client.disconnect
end
|
#echo(message) ⇒ Object
35
36
37
|
# File 'lib/lite/redis/connection.rb', line 35
def echo(message)
client.echo(message)
end
|
#flush ⇒ Object
39
40
41
|
# File 'lib/lite/redis/connection.rb', line 39
def flush
client.flushdb
end
|
#flush_all ⇒ Object
43
44
45
|
# File 'lib/lite/redis/connection.rb', line 43
def flush_all
client.flushall
end
|
#info ⇒ Object
47
48
49
|
# File 'lib/lite/redis/connection.rb', line 47
def info
client.info
end
|
#ping ⇒ Object
51
52
53
|
# File 'lib/lite/redis/connection.rb', line 51
def ping
client.ping
end
|
#quit ⇒ Object
55
56
57
|
# File 'lib/lite/redis/connection.rb', line 55
def quit
client.quit
end
|
#reconnect ⇒ Object
59
60
61
|
# File 'lib/lite/redis/connection.rb', line 59
def reconnect
client.reconnect
end
|
#rewrite_aof ⇒ Object
63
64
65
|
# File 'lib/lite/redis/connection.rb', line 63
def rewrite_aof
client.bgrewriteaof
end
|
#save ⇒ Object
67
68
69
|
# File 'lib/lite/redis/connection.rb', line 67
def save
client.bgsave
end
|
#saved_at ⇒ Object
71
72
73
|
# File 'lib/lite/redis/connection.rb', line 71
def saved_at
client.lastsave
end
|
#shutdown ⇒ Object
75
76
77
|
# File 'lib/lite/redis/connection.rb', line 75
def shutdown
client.shutdown
end
|
#slave_of(host, port) ⇒ Object
79
80
81
|
# File 'lib/lite/redis/connection.rb', line 79
def slave_of(host, port)
client.slaveof(host, port)
end
|
#slowlog(command, length = nil) ⇒ Object
83
84
85
|
# File 'lib/lite/redis/connection.rb', line 83
def slowlog(command, length = nil)
client.slowlog(command, length)
end
|
#synchronize ⇒ Object
87
88
89
|
# File 'lib/lite/redis/connection.rb', line 87
def synchronize
client.synchronize
end
|
#time ⇒ Object
91
92
93
|
# File 'lib/lite/redis/connection.rb', line 91
def time
client.time
end
|
#with_reconnect(&block) ⇒ Object
95
96
97
|
# File 'lib/lite/redis/connection.rb', line 95
def with_reconnect(&block)
client.with_reconnect(true, &block)
end
|
#without_reconnect(&block) ⇒ Object
99
100
101
|
# File 'lib/lite/redis/connection.rb', line 99
def without_reconnect(&block)
client.with_reconnect(false, &block)
end
|