예제 #1
0
 internal BoltOutput(BoltTuple bt, string compId)
 {
     Anchors          = bt.Anchors;
     this.ComponentId = compId;
     this.Stream      = bt.Stream;
     this.Task        = bt.Task;
     this.Tuple       = bt.Tuple;
     this.NeedTaskIds = bt.NeedTaskIds;
 }
        protected void Emit(List <object> tuple, string stream = "default", long task = 0, List <string> anchors = null, bool needTaskIds = false)
        {
            VerificationResult result = VerifyOutput(stream, tuple);

            if (result.IsError)
            {
                Logger.Error($"{result} for nex tuple: {tuple}.");
            }
            else
            {
                BoltTuple message = new BoltTuple()
                {
                    Task        = task,
                    Stream      = stream,
                    Tuple       = tuple,
                    Anchors     = anchors,
                    NeedTaskIds = needTaskIds
                };

                Channel.Send(message);
            }
        }