Class: Fairy::COutputFile
Instance Attribute Summary
Attributes included from CInputtable
#input
Instance Method Summary
collapse
Methods inherited from COutput
#input=
#break_running, #inputtable?
Methods inherited from CFilter
#abort_create_node, #add_node, #assgin_number_of_nodes?, #bind_export, #break_create_node, #break_running, #create_and_add_node, #create_import, #create_node, #create_nodes, #def_job_pool_variable, #each_assigned_filter, #each_export_by, #each_node, #each_node_exist_only, #handle_exception, #input, #job_pool_dict, #job_pool_variable, #nodes, #number_of_nodes, #number_of_nodes=, #pool_dict, #postmapping_policy, #start_create_nodes, #start_export, #start_watch_node_status, #update_status, watch_status, watch_status=, #watch_status?
Constructor Details
#initialize(controller, opts) ⇒ COutputFile
Returns a new instance of COutputFile.
12
13
14
15
16
17
|
# File 'lib/fairy/master/c-output-file.rb', line 12
def initialize(controller, opts)
super
@vfile = nil
end
|
Instance Method Details
#all_node_outputted? ⇒ Boolean
71
72
73
74
75
76
77
78
79
80
81
|
# File 'lib/fairy/master/c-output-file.rb', line 71
def all_node_outputted?
return false unless @number_of_nodes
all_outputted = true
each_node(:exist_only) do |node|
st = @nodes_status[node]
all_outputted &&= [:ST_FINISH, :ST_OUTPUT_FINISH].include?(st)
end
all_outputted
end
|
#njob_creation_params ⇒ Object
27
28
29
|
# File 'lib/fairy/master/c-output-file.rb', line 27
def njob_creation_params
[@vfile]
end
|
#node_class_name ⇒ Object
23
24
25
|
# File 'lib/fairy/master/c-output-file.rb', line 23
def node_class_name
"POutputFile"
end
|
#output(vf) ⇒ Object
19
20
21
|
# File 'lib/fairy/master/c-output-file.rb', line 19
def output(vf)
@vfile = vf
end
|
#wait_all_output_finished ⇒ Object
63
64
65
66
67
68
69
|
# File 'lib/fairy/master/c-output-file.rb', line 63
def wait_all_output_finished
@nodes_status_mutex.synchronize do
while !all_node_outputted?
@nodes_status_cv.wait(@nodes_status_mutex)
end
end
end
|