Class: Roma::Storage::GroongaStorage

Inherits:
BasicStorage show all
Defined in:
lib/roma/storage/groonga_storage.rb

Defined Under Namespace

Classes: GroongaHash

Constant Summary

Constants inherited from BasicStorage

BasicStorage::PACK_HEADER_TEMPLATE, BasicStorage::PACK_TEMPLATE

Instance Attribute Summary

Attributes inherited from BasicStorage

#cleanup_regexp, #dbs, #divnum, #do_each_vn_dump, #each_clean_up_sleep, #each_vn_dump_sleep, #each_vn_dump_sleep_count, #error_message, #ext_name, #hdb, #hdiv, #logic_clock_expire, #option, #st_class, #storage_path, #vn_list

Instance Method Summary collapse

Methods inherited from BasicStorage

#add, #append, #cache_file_name, #cas, #close_log, #closedb, #db_get, #db_put, #decr, #delete, #dump, #each_cache_by_keys, #each_cache_dump_pack, #each_clean_up, #each_hdb_dump, #each_vn_dump, #flush_db, #get, #get_context, #get_keys_in_cache, #get_logfile_list, #get_raw, #get_raw2, #incr, #load, #load_stream_dump, #load_stream_dump_for_cachecleaning, #open_log, #opendb, #out, #out_cache, #prepend, #rdelete, #replace, #rset, #set, #set_db_stat, #set_expt, #stop_clean_up, #true_length, #write_log

Constructor Details

#initializeGroongaStorage

Returns a new instance of GroongaStorage.



8
9
10
11
# File 'lib/roma/storage/groonga_storage.rb', line 8

def initialize
  super
  @ext_name = 'grn'
end

Instance Method Details

#get_statObject



13
14
15
16
17
18
19
20
# File 'lib/roma/storage/groonga_storage.rb', line 13

def get_stat
  ret = super
  @hdb.each_with_index do |hdb, i|
    ret["storage[#{i}].path"] = File.expand_path(hdb.path)
    ret["storage[#{i}].rnum"] = hdb.rnum
  end
  ret
end