HCE Project Python language Distributed Tasks Manager Application, Distributed Crawler Application and client API bindings.  2.0.0-chaika
Hierarchical Cluster Engine Python language binding
drce.DRCEManager.DRCEManager Class Reference
Inheritance diagram for drce.DRCEManager.DRCEManager:
Collaboration diagram for drce.DRCEManager.DRCEManager:

Public Member Functions

def __init__ (self)
 
def activate_host (self, host_params)
 
def clear_host (self)
 
def process (self, command, timeout=3000, ttl=300000)
 
def timeout_hook (self, connection_timeout, command, timeout)
 
def transport_err_hook (self, transport_internal_err, command, timeout)
 
def executor_err_hook (self, command_executor_err, command, timeout)
 

Public Attributes

 connection
 
 connect_params
 
 connect_manager
 
 cmd_executor
 

Detailed Description

Definition at line 29 of file DRCEManager.py.

Constructor & Destructor Documentation

◆ __init__()

def drce.DRCEManager.DRCEManager.__init__ (   self)
Constructor

Definition at line 33 of file DRCEManager.py.

33  def __init__(self):
34  '''
35  Constructor
36  '''
37  # @var connection
38  # a member variable, holds current connection,
39  # will be used in inheritance classes
40  self.connection = None
41  # @var connect_params
42  # a member variable, holds current connect_params
43  # will be used in inheritance classes
44  self.connect_params = None
45  self.connect_manager = ConnectionManager()
46  self.cmd_executor = CommandExecutor(self.connection, CommandConvertor())
47 
48 
def __init__(self)
constructor
Definition: UIDGenerator.py:19

Member Function Documentation

◆ activate_host()

def drce.DRCEManager.DRCEManager.activate_host (   self,
  host_params 
)

Definition at line 53 of file DRCEManager.py.

53  def activate_host(self, host_params):
54  con_params = ConnectionParams(host_params.host, host_params.port)
55  self.connection = self.connect_manager.create_connection(con_params)
56  self.connect_params = con_params
57  self.cmd_executor.replace_connection(self.connection)
58 
59 

◆ clear_host()

def drce.DRCEManager.DRCEManager.clear_host (   self)

Definition at line 63 of file DRCEManager.py.

63  def clear_host(self):
64  self.connect_manager.destroy_connection(self.connection)
65  self.connection = None
66  self.connect_params = None
67  self.cmd_executor.replace_connection(self.connection)
68 
69 

◆ executor_err_hook()

def drce.DRCEManager.DRCEManager.executor_err_hook (   self,
  command_executor_err,
  command,
  timeout 
)

Definition at line 116 of file DRCEManager.py.

116  def executor_err_hook(self, command_executor_err, command, timeout):
117  del command, timeout
118  raise command_executor_err
119 
Here is the caller graph for this function:

◆ process()

def drce.DRCEManager.DRCEManager.process (   self,
  command,
  timeout = 3000,
  ttl = 300000 
)

Definition at line 77 of file DRCEManager.py.

77  def process(self, command, timeout=3000, ttl=300000):
78  try:
79  return self.cmd_executor.execute(command, timeout, ttl)
80  except ConnectionTimeout as err:
81  self.timeout_hook(err, command, timeout)
82  except TransportInternalErr as err:
83  self.transport_err_hook(err, command, timeout)
84  except CommandExecutorErr as err:
85  self.executor_err_hook(err, command, timeout)
86 
def execute(self, commands, nodes)
execute method execute incoming commands on nodes, keepts reult in responses and responsesDicts field...
Definition: NodeManager.py:63
Here is the call graph for this function:
Here is the caller graph for this function:

◆ timeout_hook()

def drce.DRCEManager.DRCEManager.timeout_hook (   self,
  connection_timeout,
  command,
  timeout 
)

Definition at line 94 of file DRCEManager.py.

94  def timeout_hook(self, connection_timeout, command, timeout):
95  del command, timeout
96  raise connection_timeout
97 
98 
Here is the caller graph for this function:

◆ transport_err_hook()

def drce.DRCEManager.DRCEManager.transport_err_hook (   self,
  transport_internal_err,
  command,
  timeout 
)

Definition at line 105 of file DRCEManager.py.

105  def transport_err_hook(self, transport_internal_err, command, timeout):
106  del command, timeout
107  raise transport_internal_err
108 
109 
Here is the caller graph for this function:

Member Data Documentation

◆ cmd_executor

drce.DRCEManager.DRCEManager.cmd_executor

Definition at line 46 of file DRCEManager.py.

◆ connect_manager

drce.DRCEManager.DRCEManager.connect_manager

Definition at line 45 of file DRCEManager.py.

◆ connect_params

drce.DRCEManager.DRCEManager.connect_params

Definition at line 44 of file DRCEManager.py.

◆ connection

drce.DRCEManager.DRCEManager.connection

Definition at line 40 of file DRCEManager.py.


The documentation for this class was generated from the following file: