Class: Groonga::QueryLog::MemoryLeakDetector::Options

Inherits:
Object
  • Object
show all
Defined in:
lib/groonga/query-log/memory-leak-detector.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeOptions

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

Parameters:

  • value

    the value to set the attribute force_disable_cache to.



92
93
94
# File 'lib/groonga/query-log/memory-leak-detector.rb', line 92

def force_disable_cache=(value)
  @force_disable_cache = value
end

#hostObject

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_triesObject

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

#pidObject

Returns the value of attribute pid.



90
91
92
# File 'lib/groonga/query-log/memory-leak-detector.rb', line 90

def pid
  @pid
end

#portObject

Returns the value of attribute port.



88
89
90
# File 'lib/groonga/query-log/memory-leak-detector.rb', line 88

def port
  @port
end

#protocolObject

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

Returns:

  • (Boolean)


102
103
104
# File 'lib/groonga/query-log/memory-leak-detector.rb', line 102

def force_disable_cache?
  @force_disable_cache
end