Exemplo n.º 1
0
 def __init__(self, config):
     self.log = logging.getLogger(__name__)
     self._conf = config
     self._cs_db = ConnectedStateProcessor(DBConnectedState())
     namespaces = NamespaceManager().get_all_namespaces()
     if namespaces and self._conf.NAMESPACE_MODE:
         self.namespace_mode = True
         self._server_agent = AxonNameSpaceServerAgent()
         self._client_agent = AxonNameSpaceClientAgent()
     else:
         self.namespace_mode = False
         self._server_agent = AxonRootNamespaceServerAgent()
         self._client_agent = AxonRootNamespaceClientAgent()
Exemplo n.º 2
0
 def __init__(self, config):
     self.log = logging.getLogger(__name__)
     self._conf = config
     self._cs_db = ConnectedStateProcessor(DBConnectedState())
     namespaces = NamespaceManager().get_all_namespaces()
     record_queue = Queue(RECORD_QUEUE_SIZE)
     if namespaces and self._conf.NAMESPACE_MODE:
         self.namespace_mode = True
         self._server_agent = AxonNameSpaceServerAgent()
         self._client_agent = AxonNameSpaceClientAgent(record_queue)
     else:
         self.namespace_mode = False
         self._server_agent = AxonRootNamespaceServerAgent()
         self._client_agent = AxonRootNamespaceClientAgent(record_queue)
     self._start_db_pool_manager(record_queue)
Exemplo n.º 3
0
 def __init__(self, config, record_queue=None):
     self.log = logging.getLogger(__name__)
     self._conf = config
     self._cs_db = ConnectedStateProcessor(DBConnectedState())
     namespaces = NamespaceManager().get_all_namespaces()
     record_queue = Queue(
         RECORD_QUEUE_SIZE) if record_queue is None else record_queue
     if self._conf.NAMESPACE_MODE:
         if not namespaces:
             self.log.warning(
                 "No namespace is found but NAMESPACE_MODE "
                 "is set to True on config file. Create namespace(s) "
                 "and run rediscover_namespaces")
         self.namespace_mode = True
         self._server_agent = AxonNameSpaceServerAgent()
         self._client_agent = AxonNameSpaceClientAgent(record_queue)
     else:
         self.namespace_mode = False
         self._server_agent = AxonRootNamespaceServerAgent()
         self._client_agent = AxonRootNamespaceClientAgent(record_queue)
     self._start_db_pool_manager(record_queue)
Exemplo n.º 4
0
 def __init__(self):
     self.mngrs_map = {}
     self.connected_state = ConnectedStateProcessor(DBConnectedState())
     self._primary_ep = None
     self._if_manager = InterfaceManager()
     self.log = logging.getLogger(__name__)
Exemplo n.º 5
0
 def __init__(self, record_queue):
     self.mngrs_map = {}
     self.connected_state = ConnectedStateProcessor(DBConnectedState())
     self._primary_ep = None
     self._record_queue = record_queue
     self.log = logging.getLogger(__name__)