Class: Riak::Client::NetHTTPBackend
- Inherits:
-
HTTPBackend
- Object
- HTTPBackend
- Riak::Client::NetHTTPBackend
- Defined in:
- lib/riak/client/net_http_backend.rb
Overview
Uses the Ruby standard library Net::HTTP to connect to Riak. Conforms to the Riak::Client::HTTPBackend interface.
Instance Attribute Summary
Attributes inherited from HTTPBackend
Class Method Summary (collapse)
- + (Boolean) configured?
- + (Object) read_timeout
-
+ (Object) read_timeout=(timeout)
Sets the read_timeout applied to Net::HTTP connections Increase this if you have very long request times.
Instance Method Summary (collapse)
-
- (Object) teardown
Net::HTTP doesn't use persistent connections, so there's no work to do here.
Methods inherited from HTTPBackend
#delete_file, #delete_object, #fetch_object, #file_exists?, #get_bucket_props, #get_file, #get_index, #initialize, #link_walk, #list_buckets, #list_keys, #mapred, #ping, #reload_object, #search, #set_bucket_props, #stats, #store_file, #store_object, #update_search_index
Methods included from HTTPBackend::Configuration
#bucket_list_path, #bucket_properties_path, #index_eq_path, #index_range_path, #key_list_path, #link_walk_path, #luwak_path, #mapred_path, #object_path, #ping_path, #solr_select_path, #solr_update_path, #stats_path
Methods included from HTTPBackend::ObjectMethods
#load_object, #reload_headers, #store_headers
Methods included from HTTPBackend::TransportMethods
#basic_auth_header, #client_id, #default_headers, #delete, #get, #head, #path, #post, #put, #return_body?, #root_uri, #valid_response?, #verify_body!
Methods included from Util::Translation
Methods included from Util::Escape
#escape, #maybe_escape, #maybe_unescape, #unescape
Constructor Details
This class inherits a constructor from Riak::Client::HTTPBackend
Class Method Details
+ (Boolean) configured?
10 11 12 13 14 15 16 17 18 |
# File 'lib/riak/client/net_http_backend.rb', line 10 def self.configured? begin require 'net/http' require 'openssl' true rescue LoadError, NameError false end end |
+ (Object) read_timeout
26 27 28 |
# File 'lib/riak/client/net_http_backend.rb', line 26 def self.read_timeout @read_timeout ||= 4096 end |
+ (Object) read_timeout=(timeout)
Sets the read_timeout applied to Net::HTTP connections Increase this if you have very long request times.
22 23 24 |
# File 'lib/riak/client/net_http_backend.rb', line 22 def self.read_timeout=(timeout) @read_timeout = timeout end |
Instance Method Details
- (Object) teardown
Net::HTTP doesn't use persistent connections, so there's no work to do here.
32 |
# File 'lib/riak/client/net_http_backend.rb', line 32 def teardown; end |