Class: GroongaQueryLog::MemoryLeakDetector::Options
- Inherits:
-
Object
- Object
- GroongaQueryLog::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.
90 91 92 93 94 95 96 97 |
# File 'lib/groonga-query-log/memory-leak-detector.rb', line 90 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
89 90 91 |
# File 'lib/groonga-query-log/memory-leak-detector.rb', line 89 def force_disable_cache=(value) @force_disable_cache = value end |
#host ⇒ Object
Returns the value of attribute host.
84 85 86 |
# File 'lib/groonga-query-log/memory-leak-detector.rb', line 84 def host @host end |
#n_tries ⇒ Object
Returns the value of attribute n_tries.
88 89 90 |
# File 'lib/groonga-query-log/memory-leak-detector.rb', line 88 def n_tries @n_tries end |
#pid ⇒ Object
Returns the value of attribute pid.
87 88 89 |
# File 'lib/groonga-query-log/memory-leak-detector.rb', line 87 def pid @pid end |
#port ⇒ Object
Returns the value of attribute port.
85 86 87 |
# File 'lib/groonga-query-log/memory-leak-detector.rb', line 85 def port @port end |
#protocol ⇒ Object
Returns the value of attribute protocol.
86 87 88 |
# File 'lib/groonga-query-log/memory-leak-detector.rb', line 86 def protocol @protocol end |
Instance Method Details
#create_client(&block) ⇒ Object
103 104 105 106 107 108 |
# File 'lib/groonga-query-log/memory-leak-detector.rb', line 103 def create_client(&block) Groonga::Client.open(:host => @host, :port => @port, :protocol => @protocol, &block) end |
#force_disable_cache? ⇒ Boolean
99 100 101 |
# File 'lib/groonga-query-log/memory-leak-detector.rb', line 99 def force_disable_cache? @force_disable_cache end |