Class: Groonga::QueryLog::MemoryLeakDetector::Options
- Inherits:
-
Object
- Object
- Groonga::QueryLog::MemoryLeakDetector::Options
- Defined in:
- lib/groonga/query-log/memory-leak-detector.rb
Instance Attribute Summary collapse
-
#force_disable_cache ⇒ Object
writeonly
Sets the attribute force_disable_cache.
-
#host ⇒ Object
Returns the value of attribute host.
-
#n_tries ⇒ Object
Returns the value of attribute n_tries.
-
#pid ⇒ Object
Returns the value of attribute pid.
-
#port ⇒ Object
Returns the value of attribute port.
-
#protocol ⇒ Object
Returns the value of attribute protocol.
Instance Method Summary collapse
- #create_client(&block) ⇒ Object
- #force_disable_cache? ⇒ Boolean
-
#initialize ⇒ Options
constructor
A new instance of Options.
Constructor Details
#initialize ⇒ Options
Returns a new instance of Options.
93 94 95 96 97 98 99 100 |
# File 'lib/groonga/query-log/memory-leak-detector.rb', line 93 def initialize @host = "127.0.0.1" @port = 10041 @protocol = :gqtp @pid = guess_groonga_server_pid @n_tries = 10 @force_disable_cache = true end |
Instance Attribute Details
#force_disable_cache=(value) ⇒ Object (writeonly)
Sets the attribute force_disable_cache
92 93 94 |
# File 'lib/groonga/query-log/memory-leak-detector.rb', line 92 def force_disable_cache=(value) @force_disable_cache = value end |
#host ⇒ Object
Returns the value of attribute host.
87 88 89 |
# File 'lib/groonga/query-log/memory-leak-detector.rb', line 87 def host @host end |
#n_tries ⇒ Object
Returns the value of attribute n_tries.
91 92 93 |
# File 'lib/groonga/query-log/memory-leak-detector.rb', line 91 def n_tries @n_tries end |
#pid ⇒ Object
Returns the value of attribute pid.
90 91 92 |
# File 'lib/groonga/query-log/memory-leak-detector.rb', line 90 def pid @pid end |
#port ⇒ Object
Returns the value of attribute port.
88 89 90 |
# File 'lib/groonga/query-log/memory-leak-detector.rb', line 88 def port @port end |
#protocol ⇒ Object
Returns the value of attribute protocol.
89 90 91 |
# File 'lib/groonga/query-log/memory-leak-detector.rb', line 89 def protocol @protocol end |
Instance Method Details
#create_client(&block) ⇒ Object
106 107 108 109 110 111 |
# File 'lib/groonga/query-log/memory-leak-detector.rb', line 106 def create_client(&block) Groonga::Client.open(:host => @host, :port => @port, :protocol => @protocol, &block) end |
#force_disable_cache? ⇒ Boolean
102 103 104 |
# File 'lib/groonga/query-log/memory-leak-detector.rb', line 102 def force_disable_cache? @force_disable_cache end |