Class: DRbQS::ProcessList

Inherits:
Object
  • Object
show all
Defined in:
lib/drbqs/config/process_list.rb

Defined Under Namespace

Classes: ListDirectory, Node, Server

Constant Summary collapse

PROCESS_ROOT_DIRECTORY =
'process'
SERVER_DIRECTORY =
'server'
NODE_DIRECTORY =
'node'

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(home) ⇒ ProcessList

Returns a new instance of ProcessList.



186
187
188
189
190
191
# File 'lib/drbqs/config/process_list.rb', line 186

def initialize(home)
  hostname = Socket.gethostname
  @root = File.expand_path(File.join(home, PROCESS_ROOT_DIRECTORY))
  @server = DRbQS::ProcessList::Server.new(File.join(@root, SERVER_DIRECTORY, hostname))
  @node = DRbQS::ProcessList::Node.new(File.join(@root, NODE_DIRECTORY, hostname))
end

Instance Attribute Details

#nodeObject (readonly)

Returns the value of attribute node.



184
185
186
# File 'lib/drbqs/config/process_list.rb', line 184

def node
  @node
end

#rootObject (readonly)

Returns the value of attribute root.



184
185
186
# File 'lib/drbqs/config/process_list.rb', line 184

def root
  @root
end

#serverObject (readonly)

Returns the value of attribute server.



184
185
186
# File 'lib/drbqs/config/process_list.rb', line 184

def server
  @server
end

Instance Method Details

#clear_process_not_existObject



193
194
195
196
# File 'lib/drbqs/config/process_list.rb', line 193

def clear_process_not_exist
  @server.clear_process_not_exist
  @node.clear_process_not_exist
end