コード例 #1
0
 def __init__(self, aggregator):
     Processor.__init__(self, None)
     self.aggregator = aggregator
     self.previous = None
     if aggregator.timeout is not None:
         self.time = time.time()
     if aggregator.count is not None:
         self.current_count = 0
コード例 #2
0
 def __init__(self, resequencer):
     Processor.__init__(self, None)
     self.previous = None
     self.resequencer = resequencer
     self.exchanges = []
     if resequencer.timeout is not None:
         self.time = time.time()
     if resequencer.count is not None:
         self.current_count = 0
コード例 #3
0
ファイル: Pipeline.py プロジェクト: danialaswad/ncb
 def __init__(self, builder, plumber):
     self.id = builder.id
     self.plumber = plumber
     self.status = Status.stopped
     self.auto_start = builder.auto_start
     self.source = builder.source_class(plumber, builder.source_params)
     self.transient_previous = None
     self.wiretap = None
     for destination in builder.to_list:
         if destination[0] == Wiretap:
             self.wiretap = destination[1]
             continue
         channel = Channel(self.plumber, {"wiretap": self.wiretap})
         if self.source.chain is None:
             self.source.chain = channel
         if issubclass(destination[0], Destination):
             destination_obj = destination[0](plumber, destination[1])
             processor = Processor(destination_obj)
         if issubclass(destination[0], Splitter):
             destination_obj = destination[0](plumber)
             processor = SplitterProcessor(destination_obj)
         if issubclass(destination[0], Filter):
             destination_obj = destination[0](plumber)
             processor = FilterProcessor(destination_obj)
         if issubclass(destination[0], Aggregator):
             destination_obj = destination[0](plumber, destination[1])
             processor = AggregatorProcessor(destination_obj)
         if issubclass(destination[0], RoutingSlip):
             destination_obj = destination[0](plumber, destination[1])
             processor = RoutingSlipProcessor(destination_obj)
         if issubclass(destination[0], DynamicRouter):
             destination_obj = destination[0](plumber, destination[1])
             processor = DynamicRouterProcessor(destination_obj)
         if issubclass(destination[0], Validator):
             destination_obj = destination[0](plumber)
             processor = ValidatorProcessor(destination_obj)
         if destination[0] == Multicast:
             destination_obj = destination[0](plumber, destination[1])
             processor = MulticastProcessor(destination_obj)
         if destination[0] == ContentBasedRouter:
             destination_obj = destination[0](plumber, destination[1])
             processor = ContentBasedRouterProcessor(destination_obj)
         if destination[0] == Resequencer:
             destination_obj = destination[0](plumber, destination[1])
             processor = ResequencerProcessor(destination_obj)
         channel.next = processor
         if self.transient_previous is not None:
             self.transient_previous.next = channel
         self.transient_previous = processor
         self.wiretap = None
コード例 #4
0
 def __init__(self, splitter):
     Processor.__init__(self, None)
     self.splitter = splitter
コード例 #5
0
 def __init__(self, routing_slip):
     Processor.__init__(self, None)
     self.routing_slip = routing_slip
コード例 #6
0
 def __init__(self, cbr):
     Processor.__init__(self, None)
     self.cbr = cbr
コード例 #7
0
 def __init__(self, filter):
     Processor.__init__(self, None)
     self.filter = filter
コード例 #8
0
ファイル: MulticastProcessor.py プロジェクト: danialaswad/ncb
 def __init__(self, multicast):
     Processor.__init__(self, None)
     self.multicast = multicast
コード例 #9
0
 def __init__(self, dynamic_router):
     Processor.__init__(self, None)
     self.dynamic_router = dynamic_router
コード例 #10
0
 def __init__(self, validator):
     Processor.__init__(self, None)
     self.validator = validator