Esempio n. 1
0
 def __init__(self, timeout=2.0):
     self.timeout = timeout
     self.stations = {}
     self._monitor = monitor.ChannelMonitor(self.timeout)
     self.tm_number = self.tm_counter.increment()
     self._response_tp = ThreadPool(1, 'Jace Response Pool')
     self._pending_responses = Queue()
     self._callbacks = {}
     self._running = False
     self._sync_get_lock = Lock()
     self._last_sync_get = uptime.secs()
     self._cv = Condition()
     ImmortalThread.__init__(self, None, None,
                             'Jace Transaction Manager')
     return
Esempio n. 2
0
 def start(self):
     if not isinstance(sys.stderr, OutputSplitter):
         self.standard_error = sys.stderr
         sys.stderr = OutputSplitter(sys.stderr)
     if not isinstance(sys.stdout, OutputSplitter):
         self.standard_output = sys.stdout
         sys.stdout = OutputSplitter(sys.stdout)
     if self.monitor is None:
         self.monitor = monitor.ChannelMonitor()
     if self.dispatcher is None:
         self.dispatcher = ConsoleDispatcher(self)
     if not self.monitor.is_running():
         self.monitor.start_monitor()
     if not self.dispatcher.is_dispatching():
         self.dispatcher.start_dispatching()
     self.logoutput('%s started.', self, type=msglog.types.INFO)
     return super(InteractiveService, self).start()
Esempio n. 3
0
 def __init__(self, *args):
     self.monitor = monitor.ChannelMonitor()
     self.transaction_manager = TransactionManager(self.monitor)
     super(AnsychronousSubscriptionTransport, self).__init__(*args)
Esempio n. 4
0
 def _set_monitor(self, channelmonitor=None):
     if channelmonitor is None:
         channelmonitor = monitor.ChannelMonitor()
     else:
         assert isinstance(channelmonitor, monitor.ChannelMonitor)
     self.monitor = channelmonitor
Esempio n. 5
0
 def __init__(self):
     self.hosts = {}
     self.localhost = Undefined
     self.monitor = monitor.ChannelMonitor()
     self.dispatcher = dispatch.Dispatcher(self)
     super(MessagingService, self).__init__()