def __init__(self, *args, **kwargs): super(EventSocketDispatcher, self).__init__(*args, **kwargs) self.__logger__ = logging.getLogger(object_fqn(self)) self.__observers__ = {} self.__owner__ = None self.__transactions__ = {} self.__watches__ = []
def __init__(self, meta, scheduler): self._logger = logging.getLogger(object_fqn(self)) self._applications = ActorRegistry(scheduler) self._services = ActorRegistry(scheduler) self._meta = meta self._observers = dict() self._scheduler = scheduler super(Server, self).__init__(scheduler)
def __init__(self, *args, **kwargs): self._logger = logging.getLogger(object_fqn(self)) settings.update(config) if 'settings' in kwargs: settings.update(kwargs.get('settings')) else: settings.update({'application_prefix': 'applications'}) self._metafile = kwargs.get('metafile', None)
def __init__(self, actor, mailbox, scheduler, urn): super(ActorProcessor, self).__init__() self._logger = logging.getLogger(object_fqn(self)) self._actor = actor self._mailbox = mailbox self._scheduler = scheduler self._state = None # Run-time statistics. self._slice_msg_count = 0 self._slice_penalty = 0 self._slice_run_time = 0 self._total_msg_count = 0 self._total_run_time = 0
def __init__(self, max_msgs_slice, max_time_slice): super(ActorScheduler, self).__init__() self._logger = logging.getLogger(object_fqn(self)) self._max_msgs_slice = max_msgs_slice self._max_time_slice = max_time_slice # In milliseconds. # Scheduler run-time state. self._curr_actor_proc = None self._idle_actor_procs = list() self._ready_actor_procs = list() self._waiting_actor_procs = list() self._running = False self._barrier = threading.Event() # Run-time statistics. self._start_run_time = None self._stop_run_time = None self._total_msgs_processed = 0
def __init__(self, *args, **kwargs): super(TimerService, self).__init__(*args, **kwargs) # Initialize the timing wheels. The finest possible self._logger = logging.getLogger(object_fqn(self)) # granularity is 100ms. self._timer_vector1 = self._create_vector(256) self._timer_vector2 = self._create_vector(256) self._timer_vector3 = self._create_vector(256) self._timer_vector4 = self._create_vector(256) # Initialize the timer vector indices. self._timer_vector2_index = 0 self._timer_vector3_index = 0 self._timer_vector4_index = 0 # Initialize the tick counter. self._current_tick = 0 # Initialize the actor lookup table for O(1) timer removal. self._actor_lookup_table = dict() # Singleton instance of the timeout event. self._timeout = TimeoutEvent() # Monotonic clock. self._clock = None
def __init__(self, schedulers): super(ActorSchedulerManager, self).__init__() self._logger = logging.getLogger(object_fqn(self)) self._counter = 0 self._schedulers = schedulers
def _fqn(self, o): if type(o) == type: return class_fqn(o) else: return object_fqn(o)
def __init__(self, observer): self.__logger__ = logging.getLogger(object_fqn(self)) self.__observer__ = observer
def __init__(self, observer): self._logger = logging.getLogger(object_fqn(self)) self._buffer = None self._host = None self._observer = observer self._peer = None
def __init__(self, *args, **kwargs): super(SQLAlchemyService, self).__init__(*args) self._logger = logging.getLogger(object_fqn(self)) self._engines = dict() self._session_makers = dict() self._start()
def __init__(self, scheduler, *args, **kwargs): super(HelloSmtpWorld, self).__init__(scheduler) self.__logger__ = logging.getLogger(object_fqn(self))
def __init__(self, *args, **kwargs): super(SmtpDispatcher, self).__init__(*args, **kwargs) self.__logger__ = logging.getLogger(object_fqn(self))
def __init__(self, scheduler): super(ActorRegistry, self).__init__() self._logger = logging.getLogger(object_fqn(self)) self._classes = dict() self._singletons = dict() self._scheduler = scheduler
def __init__(self, *args, **kwargs): super(EventSocketBootstrapper, self).__init__(*args, **kwargs) self._logger = logging.getLogger(object_fqn(self)) self._dispatcher = kwargs.get('dispatcher') self._events = kwargs.get('events') self._password = settings.freeswitch.get('password')