Class: GroongaQueryLog::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.



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

Parameters:

  • value

    the value to set the attribute force_disable_cache to.



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

def force_disable_cache=(value)
  @force_disable_cache = value
end

#hostObject

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_triesObject

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

#pidObject

Returns the value of attribute pid.



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

def pid
  @pid
end

#portObject

Returns the value of attribute port.



85
86
87
# File 'lib/groonga-query-log/memory-leak-detector.rb', line 85

def port
  @port
end

#protocolObject

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

Returns:

  • (Boolean)


99
100
101
# File 'lib/groonga-query-log/memory-leak-detector.rb', line 99

def force_disable_cache?
  @force_disable_cache
end