Class: ProconBypassMan::Procon::PerformanceMeasurement::QueueOverProcess
- Inherits:
-
Object
- Object
- ProconBypassMan::Procon::PerformanceMeasurement::QueueOverProcess
show all
- Extended by:
- CanOverProcess
- Includes:
- Singleton
- Defined in:
- lib/procon_bypass_man/procon/performance_measurement/queue_over_process.rb
Constant Summary
CanOverProcess::PROTOCOL
Instance Attribute Summary collapse
Class Method Summary
collapse
Instance Method Summary
collapse
distributed_class, enable?, extended, shutdown_distributed_object, socket_file_path, socket_path, start_distributed_object!
Constructor Details
Returns a new instance of QueueOverProcess.
35
36
37
|
# File 'lib/procon_bypass_man/procon/performance_measurement/queue_over_process.rb', line 35
def initialize
@distributed_queue = DRbObject.new_with_uri(self.class.socket_path)
end
|
Instance Attribute Details
#distributed_queue ⇒ Object
Returns the value of attribute distributed_queue.
6
7
8
|
# File 'lib/procon_bypass_man/procon/performance_measurement/queue_over_process.rb', line 6
def distributed_queue
@distributed_queue
end
|
Class Method Details
.distributed_class ⇒ Object
.pop ⇒ Object
29
30
31
32
33
|
# File 'lib/procon_bypass_man/procon/performance_measurement/queue_over_process.rb', line 29
def self.pop
return unless enable?
instance.distributed_queue.pop
end
|
.push(value) ⇒ Object
23
24
25
26
27
|
# File 'lib/procon_bypass_man/procon/performance_measurement/queue_over_process.rb', line 23
def self.push(value)
return unless enable?
instance.distributed_queue.push(value)
end
|
.socket_file_path ⇒ Object
19
20
21
|
# File 'lib/procon_bypass_man/procon/performance_measurement/queue_over_process.rb', line 19
def self.socket_file_path
"/tmp/procon_bypass_man_procon_performance_queue".freeze
end
|