Method: Aerospike::AdminCommand#query_role
- Defined in:
- lib/aerospike/command/admin_command.rb
#query_role(cluster, policy, role) ⇒ Object
196 197 198 199 200 201 202 203 204 205 206 207 208 209 |
# File 'lib/aerospike/command/admin_command.rb', line 196 def query_role(cluster, policy, role) # TODO: Remove the workaround in the future sleep(0.010) list = [] begin write_header(QUERY_ROLES, 1) write_field_str(ROLE, role) list = read_roles(cluster, policy) return (list.is_a?(Array) && list.length > 0 ? list.first : nil) ensure Buffer.put(@data_buffer) end end |