class
Mosquito::RedisBackend
- Mosquito::RedisBackend
- Mosquito::Backend
- Reference
- Object
Defined in:
mosquito/redis_backend.crye_olde_redis.cr
Constant Summary
-
LIST_OF_OVERSEERS_KEY =
"overseers" -
LIST_OF_QUEUES_KEY =
"queues" -
Log =
::Log.for(self)
Instance Method Summary
- #average(key : String) : Int32
-
#average_push(key : String, value : Int32, window_size : Int32 = 100) : Nil
Metrics
- #connection : Redis::Client | Nil
- #connection=(client : Redis::Client)
- #connection_string : String | Nil
- #connection_string=(value : String)
- #delete(key : String, in ttl : Int64 = 0) : Nil
- #delete(key : String, in ttl : Time::Span) : Nil
- #delete_field(key : String, field : String) : Nil
- #deregister_overseer(id : String) : Nil
- #expires_in(key : String) : Int64
- #expiring_list_fetch(key : String, expire_items_older_than : Time) : Array(String)
-
#expiring_list_push(key : String, value : String) : Nil
TODO this should take the timestamp as an argument
-
#flush : Nil
is this even a good idea?
- #get(key : String, field : String) : String | Nil
- #increment(key : String, field : String, by value : Int32) : Int64
- #increment(key : String, field : String) : Int64
- #list_active_overseers(since : Time) : Array(String)
- #list_overseers : Array(String)
-
#list_queues : Array(String)
Global
- #lock?(key : String, value : String, ttl : Time::Span) : Bool
- #publish(key : String, value : String) : Nil
- #redis
- #register_overseer(id : String) : Nil
- #remove_matching_key(*, keys = [] of String, args = [] of String, loadscripts = true)
- #retrieve(key : String) : Hash(String, String)
- #set(key : String, field : String, value : String) : String
- #set(key : String, values : Hash(String, String | Nil) | Hash(String, Nil) | Hash(String, String)) : Nil
- #store(key : String, value : Hash(String, String | Nil) | Hash(String, String)) : Nil
- #subscribe(key : String) : Channel(Backend::BroadcastMessage)
-
#unlock(key : String, value : String) : Nil
Coordination
- #valid_configuration? : Bool
Instance methods inherited from class Mosquito::Backend
average(key : String) : Int32
average,
average_push(key : String, value : Int32, window_size : Int32 = 100) : Nil
average_push,
build_key(*parts)
build_key,
connection
connection,
connection_string : String | Nil
connection_string,
connection_string=(value : String)
connection_string=,
delete(key : String, in ttl : Int64 = 0) : Nildelete(key : String, in ttl : Time::Span) : Nil delete, delete_field(key : String, field : String) : Nil delete_field, deregister_overseer(id : String) : Nil deregister_overseer, expires_in(key : String) : Int64 expires_in, flush : Nil flush, get(key : String, field : String) : String | Nil get, increment(key : String, field : String, by value : Int32) : Int64
increment(key : String, field : String) : Int64 increment, list_active_overseers(since : Time) : Array(String) list_active_overseers, list_overseers : Array(String) list_overseers, list_queues : Array(String) list_queues, lock?(key : String, value : String, ttl : Time::Span) : Bool lock?, publish(key : String, value : String) : Nil publish, queue(name : String | Symbol) : Queue queue, register_overseer(id : String) : Nil register_overseer, retrieve(key : String) : Hash(String, String) retrieve, set(key : String, field : String, value : String) : String
set(key : String, values : Hash(String, String | Nil) | Hash(String, Nil) | Hash(String, String)) : Nil set, store(key : String, value : Hash(String, String | Nil) | Hash(String, String)) : Nil store, subscribe(key : String) : Channel(BroadcastMessage) subscribe, unlock(key : String, value : String) : Nil unlock, valid_configuration? : Bool valid_configuration?
Instance Method Detail
def average_push(key : String, value : Int32, window_size : Int32 = 100) : Nil
#
Description copied from class Mosquito::Backend
Metrics
def expiring_list_push(key : String, value : String) : Nil
#
TODO this should take the timestamp as an argument
def set(key : String, values : Hash(String, String | Nil) | Hash(String, Nil) | Hash(String, String)) : Nil
#
def unlock(key : String, value : String) : Nil
#
Description copied from class Mosquito::Backend
Coordination