Esempio n. 1
0
    def __init_broadcast_scheduler(self):
        scheduler = BroadcastSchedulerFactory.new(channel=ChannelProperty().name,
                                                  self_target=ChannelProperty().peer_target)
        scheduler.start()

        self.__broadcast_scheduler = scheduler

        scheduler.schedule_job(BroadcastCommand.SUBSCRIBE, ChannelProperty().peer_target,
                               block=True, block_timeout=conf.TIMEOUT_FOR_FUTURE)
Esempio n. 2
0
    def __init__(self, channel_name: str, peer_target: str,
                 tx_versioner: TransactionVersioner):
        self.__channel_name = channel_name
        self.__properties = dict()
        self.__tx_versioner = tx_versioner

        scheduler = BroadcastSchedulerFactory.new(channel=channel_name,
                                                  self_target=peer_target,
                                                  is_multiprocessing=True)
        scheduler.start()
        self.__broadcast_scheduler = scheduler
        self.__qos_controller = QosController()
        self.__qos_controller.append(
            QosCountControl(limit_count=conf.TPS_LIMIT_PER_SEC))
Esempio n. 3
0
    def __init__(self, channel_name: str, peer_target: str,
                 tx_versioner: TransactionVersioner):
        self.__channel_name = channel_name
        self.__tx_versioner = tx_versioner

        scheduler = BroadcastSchedulerFactory.new(channel=channel_name,
                                                  self_target=peer_target,
                                                  is_multiprocessing=True)
        scheduler.start()

        self.__broadcast_scheduler = scheduler

        scheduler.schedule_job(BroadcastCommand.SUBSCRIBE,
                               peer_target,
                               block=True,
                               block_timeout=conf.TIMEOUT_FOR_FUTURE)
Esempio n. 4
0
    def __start_broadcast_scheduler(self, channel):
        scheduler = BroadcastSchedulerFactory.new(channel=channel)
        scheduler.start()

        self.__broadcast_schedulers[channel] = scheduler
        return scheduler
Esempio n. 5
0
 def __init_broadcast_scheduler(self):
     scheduler = BroadcastSchedulerFactory.new(channel=ChannelProperty().name,
                                               self_target=ChannelProperty().peer_target)
     scheduler.start()
     self.__broadcast_scheduler = scheduler