Class: Snowflake::Processor

Inherits:
Object
  • Object
show all
Includes:
Thrift::Processor
Defined in:
lib/snowflake.rb

Instance Method Summary collapse

Instance Method Details

#process_get_datacenter_id(seqid, iprot, oprot) ⇒ Object



100
101
102
103
104
105
# File 'lib/snowflake.rb', line 100

def process_get_datacenter_id(seqid, iprot, oprot)
  args = read_args(iprot, Get_datacenter_id_args)
  result = Get_datacenter_id_result.new()
  result.success = @handler.get_datacenter_id()
  write_result(result, oprot, 'get_datacenter_id', seqid)
end

#process_get_id(seqid, iprot, oprot) ⇒ Object



93
94
95
96
97
98
# File 'lib/snowflake.rb', line 93

def process_get_id(seqid, iprot, oprot)
  args = read_args(iprot, Get_id_args)
  result = Get_id_result.new()
  result.success = @handler.get_id(args.useragent)
  write_result(result, oprot, 'get_id', seqid)
end

#process_get_timestamp(seqid, iprot, oprot) ⇒ Object



86
87
88
89
90
91
# File 'lib/snowflake.rb', line 86

def process_get_timestamp(seqid, iprot, oprot)
  args = read_args(iprot, Get_timestamp_args)
  result = Get_timestamp_result.new()
  result.success = @handler.get_timestamp()
  write_result(result, oprot, 'get_timestamp', seqid)
end

#process_get_worker_id(seqid, iprot, oprot) ⇒ Object



79
80
81
82
83
84
# File 'lib/snowflake.rb', line 79

def process_get_worker_id(seqid, iprot, oprot)
  args = read_args(iprot, Get_worker_id_args)
  result = Get_worker_id_result.new()
  result.success = @handler.get_worker_id()
  write_result(result, oprot, 'get_worker_id', seqid)
end