Class: Concord::Thrift::BoltMetricsService::Processor

Inherits:
Object
  • Object
show all
Includes:
Thrift::Processor
Defined in:
lib/gen-rb/bolt_metrics_service.rb

Instance Method Summary collapse

Instance Method Details

#process_gauge(seqid, iprot, oprot) ⇒ Object



81
82
83
84
85
86
87
88
89
90
# File 'lib/gen-rb/bolt_metrics_service.rb', line 81

def process_gauge(seqid, iprot, oprot)
  args = read_args(iprot, Gauge_args)
  result = Gauge_result.new()
  begin
    @handler.gauge(args.name, args.val)
  rescue ::Concord::Thrift::BoltError => e
    result.e = e
  end
  write_result(result, oprot, 'gauge', seqid)
end

#process_histogram(seqid, iprot, oprot) ⇒ Object



103
104
105
106
107
108
109
110
111
112
# File 'lib/gen-rb/bolt_metrics_service.rb', line 103

def process_histogram(seqid, iprot, oprot)
  args = read_args(iprot, Histogram_args)
  result = Histogram_result.new()
  begin
    @handler.histogram(args.name, args.measure)
  rescue ::Concord::Thrift::BoltError => e
    result.e = e
  end
  write_result(result, oprot, 'histogram', seqid)
end

#process_sum(seqid, iprot, oprot) ⇒ Object



114
115
116
117
118
119
120
121
122
123
# File 'lib/gen-rb/bolt_metrics_service.rb', line 114

def process_sum(seqid, iprot, oprot)
  args = read_args(iprot, Sum_args)
  result = Sum_result.new()
  begin
    @handler.sum(args.name, args.counter)
  rescue ::Concord::Thrift::BoltError => e
    result.e = e
  end
  write_result(result, oprot, 'sum', seqid)
end

#process_timer(seqid, iprot, oprot) ⇒ Object



92
93
94
95
96
97
98
99
100
101
# File 'lib/gen-rb/bolt_metrics_service.rb', line 92

def process_timer(seqid, iprot, oprot)
  args = read_args(iprot, Timer_args)
  result = Timer_result.new()
  begin
    @handler.timer(args.name, args.duration)
  rescue ::Concord::Thrift::BoltError => e
    result.e = e
  end
  write_result(result, oprot, 'timer', seqid)
end