Class: ActiveOrm::Redis::Connection
- Defined in:
- lib/active_orm/redis/connection.rb
Class Method Summary collapse
- .authenticate(password) ⇒ Object
- .connected? ⇒ Boolean
- .database(index) ⇒ Object
- .database_id ⇒ Object
- .database_size ⇒ Object
- .debug(*args) ⇒ Object
- .disconnect ⇒ Object
- .echo(message) ⇒ Object
- .flush ⇒ Object
- .flush_all ⇒ Object
- .info ⇒ Object
- .ping ⇒ Object
- .quit ⇒ Object
- .reconnect ⇒ Object
- .rewrite_aof ⇒ Object
- .save ⇒ Object
- .saved_at ⇒ Object
- .shutdown ⇒ Object
- .slave_of(host, port) ⇒ Object
- .slowlog(command, length = nil) ⇒ Object
- .synchronize ⇒ Object
- .time ⇒ Object
- .with_reconnect(&block) ⇒ Object
- .without_reconnect(&block) ⇒ Object
Methods inherited from Base
Class Method Details
.authenticate(password) ⇒ Object
6 7 8 |
# File 'lib/active_orm/redis/connection.rb', line 6 def authenticate(password) client.auth(password) end |
.connected? ⇒ Boolean
10 11 12 |
# File 'lib/active_orm/redis/connection.rb', line 10 def connected? client.connected? end |
.database(index) ⇒ Object
14 15 16 |
# File 'lib/active_orm/redis/connection.rb', line 14 def database(index) client.select(index) end |
.database_id ⇒ Object
18 19 20 |
# File 'lib/active_orm/redis/connection.rb', line 18 def database_id client.database_id end |
.database_size ⇒ Object
22 23 24 |
# File 'lib/active_orm/redis/connection.rb', line 22 def database_size client.dbsize end |
.debug(*args) ⇒ Object
26 27 28 |
# File 'lib/active_orm/redis/connection.rb', line 26 def debug(*args) client.debug(args) end |
.disconnect ⇒ Object
30 31 32 |
# File 'lib/active_orm/redis/connection.rb', line 30 def disconnect client.disconnect end |
.echo(message) ⇒ Object
34 35 36 |
# File 'lib/active_orm/redis/connection.rb', line 34 def echo() client.echo() end |
.flush ⇒ Object
38 39 40 |
# File 'lib/active_orm/redis/connection.rb', line 38 def flush client.flushdb end |
.flush_all ⇒ Object
42 43 44 |
# File 'lib/active_orm/redis/connection.rb', line 42 def flush_all client.flushall end |
.info ⇒ Object
46 47 48 |
# File 'lib/active_orm/redis/connection.rb', line 46 def info client.info end |
.ping ⇒ Object
50 51 52 |
# File 'lib/active_orm/redis/connection.rb', line 50 def ping client.ping end |
.quit ⇒ Object
54 55 56 |
# File 'lib/active_orm/redis/connection.rb', line 54 def quit client.quit end |
.reconnect ⇒ Object
58 59 60 |
# File 'lib/active_orm/redis/connection.rb', line 58 def reconnect client.reconnect end |
.rewrite_aof ⇒ Object
62 63 64 |
# File 'lib/active_orm/redis/connection.rb', line 62 def rewrite_aof client.bgrewriteaof end |
.save ⇒ Object
66 67 68 |
# File 'lib/active_orm/redis/connection.rb', line 66 def save client.bgsave end |
.saved_at ⇒ Object
70 71 72 |
# File 'lib/active_orm/redis/connection.rb', line 70 def saved_at client.lastsave end |
.shutdown ⇒ Object
74 75 76 |
# File 'lib/active_orm/redis/connection.rb', line 74 def shutdown client.shutdown end |
.slave_of(host, port) ⇒ Object
78 79 80 |
# File 'lib/active_orm/redis/connection.rb', line 78 def slave_of(host, port) client.slaveof(host, port) end |
.slowlog(command, length = nil) ⇒ Object
82 83 84 |
# File 'lib/active_orm/redis/connection.rb', line 82 def slowlog(command, length = nil) client.slowlog(command, length) end |
.synchronize ⇒ Object
86 87 88 |
# File 'lib/active_orm/redis/connection.rb', line 86 def synchronize client.synchronize end |
.time ⇒ Object
90 91 92 |
# File 'lib/active_orm/redis/connection.rb', line 90 def time client.time end |
.with_reconnect(&block) ⇒ Object
94 95 96 |
# File 'lib/active_orm/redis/connection.rb', line 94 def with_reconnect(&block) client.with_reconnect(true, &block) end |
.without_reconnect(&block) ⇒ Object
98 99 100 |
# File 'lib/active_orm/redis/connection.rb', line 98 def without_reconnect(&block) client.with_reconnect(false, &block) end |