Class: ConnectionPool
- Inherits:
-
Object
- Object
- ConnectionPool
- Defined in:
- lib/tablestore/connection.rb
Constant Summary collapse
- NUM_POOLS =
5
Instance Method Summary collapse
-
#initialize(host, path, timeout = 0, maxsize = 50) ⇒ ConnectionPool
constructor
A new instance of ConnectionPool.
- #send_receive(url, request_headers, request_body) ⇒ Object
Constructor Details
#initialize(host, path, timeout = 0, maxsize = 50) ⇒ ConnectionPool
Returns a new instance of ConnectionPool.
10 11 12 13 |
# File 'lib/tablestore/connection.rb', line 10 def initialize(host, path, timeout=0, maxsize=50) @host = host @path = path end |
Instance Method Details
#send_receive(url, request_headers, request_body) ⇒ Object
15 16 17 18 19 20 21 |
# File 'lib/tablestore/connection.rb', line 15 def send_receive(url, request_headers, request_body) response = RestClient.post(url, request_body, request_headers) response_headers = response.headers response_body = response.body return response.status, response_headers, response_body end |