Class: Haplocheirus::TimelineStore::Client

Inherits:
Object
  • Object
show all
Includes:
Thrift::Client
Defined in:
lib/haplocheirus/thrift/timeline_store.rb

Instance Method Summary collapse

Instance Method Details

#append(entry, timeline_prefix, timeline_ids) ⇒ Object



15
16
17
18
# File 'lib/haplocheirus/thrift/timeline_store.rb', line 15

def append(entry, timeline_prefix, timeline_ids)
  send_append(entry, timeline_prefix, timeline_ids)
  recv_append()
end

#delete_timeline(timeline_id) ⇒ Object



216
217
218
219
# File 'lib/haplocheirus/thrift/timeline_store.rb', line 216

def delete_timeline(timeline_id)
  send_delete_timeline(timeline_id)
  recv_delete_timeline()
end

#filter(timeline_id, entries, max_search) ⇒ Object



45
46
47
48
# File 'lib/haplocheirus/thrift/timeline_store.rb', line 45

def filter(timeline_id, entries, max_search)
  send_filter(timeline_id, entries, max_search)
  return recv_filter()
end

#filter2(timeline_id, id, max_search) ⇒ Object



61
62
63
64
# File 'lib/haplocheirus/thrift/timeline_store.rb', line 61

def filter2(timeline_id, id, max_search)
  send_filter2(timeline_id, id, max_search)
  return recv_filter2()
end

#get(timeline_id, offset, length, dedupe) ⇒ Object



77
78
79
80
# File 'lib/haplocheirus/thrift/timeline_store.rb', line 77

def get(timeline_id, offset, length, dedupe)
  send_get(timeline_id, offset, length, dedupe)
  return recv_get()
end

#get_multi(gets) ⇒ Object



93
94
95
96
# File 'lib/haplocheirus/thrift/timeline_store.rb', line 93

def get_multi(gets)
  send_get_multi(gets)
  return recv_get_multi()
end

#get_range(timeline_id, from_id, to_id, dedupe) ⇒ Object



108
109
110
111
# File 'lib/haplocheirus/thrift/timeline_store.rb', line 108

def get_range(timeline_id, from_id, to_id, dedupe)
  send_get_range(timeline_id, from_id, to_id, dedupe)
  return recv_get_range()
end

#get_range_multi(get_ranges) ⇒ Object



124
125
126
127
# File 'lib/haplocheirus/thrift/timeline_store.rb', line 124

def get_range_multi(get_ranges)
  send_get_range_multi(get_ranges)
  return recv_get_range_multi()
end

#merge(timeline_id, entries) ⇒ Object



154
155
156
157
# File 'lib/haplocheirus/thrift/timeline_store.rb', line 154

def merge(timeline_id, entries)
  send_merge(timeline_id, entries)
  recv_merge()
end

#merge_indirect(dest_timeline_id, source_timeline_id) ⇒ Object



184
185
186
187
# File 'lib/haplocheirus/thrift/timeline_store.rb', line 184

def merge_indirect(dest_timeline_id, source_timeline_id)
  send_merge_indirect(dest_timeline_id, source_timeline_id)
  return recv_merge_indirect()
end

#recv_appendObject



24
25
26
27
28
# File 'lib/haplocheirus/thrift/timeline_store.rb', line 24

def recv_append()
  result = receive_message(Append_result)
  raise result.ex unless result.ex.nil?
  return
end

#recv_delete_timelineObject



225
226
227
228
229
# File 'lib/haplocheirus/thrift/timeline_store.rb', line 225

def recv_delete_timeline()
  result = receive_message(Delete_timeline_result)
  raise result.ex unless result.ex.nil?
  return
end

#recv_filterObject

Raises:

  • (::Thrift::ApplicationException)


54
55
56
57
58
59
# File 'lib/haplocheirus/thrift/timeline_store.rb', line 54

def recv_filter()
  result = receive_message(Filter_result)
  return result.success unless result.success.nil?
  raise result.ex unless result.ex.nil?
  raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'filter failed: unknown result')
end

#recv_filter2Object

Raises:

  • (::Thrift::ApplicationException)


70
71
72
73
74
75
# File 'lib/haplocheirus/thrift/timeline_store.rb', line 70

def recv_filter2()
  result = receive_message(Filter2_result)
  return result.success unless result.success.nil?
  raise result.ex unless result.ex.nil?
  raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'filter2 failed: unknown result')
end

#recv_getObject

Raises:

  • (::Thrift::ApplicationException)


86
87
88
89
90
91
# File 'lib/haplocheirus/thrift/timeline_store.rb', line 86

def recv_get()
  result = receive_message(Get_result)
  return result.success unless result.success.nil?
  raise result.ex unless result.ex.nil?
  raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get failed: unknown result')
end

#recv_get_multiObject

Raises:

  • (::Thrift::ApplicationException)


102
103
104
105
106
# File 'lib/haplocheirus/thrift/timeline_store.rb', line 102

def recv_get_multi()
  result = receive_message(Get_multi_result)
  return result.success unless result.success.nil?
  raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_multi failed: unknown result')
end

#recv_get_rangeObject

Raises:

  • (::Thrift::ApplicationException)


117
118
119
120
121
122
# File 'lib/haplocheirus/thrift/timeline_store.rb', line 117

def recv_get_range()
  result = receive_message(Get_range_result)
  return result.success unless result.success.nil?
  raise result.ex unless result.ex.nil?
  raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_range failed: unknown result')
end

#recv_get_range_multiObject

Raises:

  • (::Thrift::ApplicationException)


133
134
135
136
137
# File 'lib/haplocheirus/thrift/timeline_store.rb', line 133

def recv_get_range_multi()
  result = receive_message(Get_range_multi_result)
  return result.success unless result.success.nil?
  raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_range_multi failed: unknown result')
end

#recv_mergeObject



163
164
165
166
167
# File 'lib/haplocheirus/thrift/timeline_store.rb', line 163

def recv_merge()
  result = receive_message(Merge_result)
  raise result.ex unless result.ex.nil?
  return
end

#recv_merge_indirectObject

Raises:

  • (::Thrift::ApplicationException)


193
194
195
196
197
198
# File 'lib/haplocheirus/thrift/timeline_store.rb', line 193

def recv_merge_indirect()
  result = receive_message(Merge_indirect_result)
  return result.success unless result.success.nil?
  raise result.ex unless result.ex.nil?
  raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'merge_indirect failed: unknown result')
end

#recv_removeObject



39
40
41
42
43
# File 'lib/haplocheirus/thrift/timeline_store.rb', line 39

def recv_remove()
  result = receive_message(Remove_result)
  raise result.ex unless result.ex.nil?
  return
end

#recv_storeObject



148
149
150
151
152
# File 'lib/haplocheirus/thrift/timeline_store.rb', line 148

def recv_store()
  result = receive_message(Store_result)
  raise result.ex unless result.ex.nil?
  return
end

#recv_unmergeObject



178
179
180
181
182
# File 'lib/haplocheirus/thrift/timeline_store.rb', line 178

def recv_unmerge()
  result = receive_message(Unmerge_result)
  raise result.ex unless result.ex.nil?
  return
end

#recv_unmerge_indirectObject

Raises:

  • (::Thrift::ApplicationException)


209
210
211
212
213
214
# File 'lib/haplocheirus/thrift/timeline_store.rb', line 209

def recv_unmerge_indirect()
  result = receive_message(Unmerge_indirect_result)
  return result.success unless result.success.nil?
  raise result.ex unless result.ex.nil?
  raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'unmerge_indirect failed: unknown result')
end

#remove(entry, timeline_prefix, timeline_ids) ⇒ Object



30
31
32
33
# File 'lib/haplocheirus/thrift/timeline_store.rb', line 30

def remove(entry, timeline_prefix, timeline_ids)
  send_remove(entry, timeline_prefix, timeline_ids)
  recv_remove()
end

#send_append(entry, timeline_prefix, timeline_ids) ⇒ Object



20
21
22
# File 'lib/haplocheirus/thrift/timeline_store.rb', line 20

def send_append(entry, timeline_prefix, timeline_ids)
  send_message('append', Append_args, :entry => entry, :timeline_prefix => timeline_prefix, :timeline_ids => timeline_ids)
end

#send_delete_timeline(timeline_id) ⇒ Object



221
222
223
# File 'lib/haplocheirus/thrift/timeline_store.rb', line 221

def send_delete_timeline(timeline_id)
  send_message('delete_timeline', Delete_timeline_args, :timeline_id => timeline_id)
end

#send_filter(timeline_id, entries, max_search) ⇒ Object



50
51
52
# File 'lib/haplocheirus/thrift/timeline_store.rb', line 50

def send_filter(timeline_id, entries, max_search)
  send_message('filter', Filter_args, :timeline_id => timeline_id, :entries => entries, :max_search => max_search)
end

#send_filter2(timeline_id, id, max_search) ⇒ Object



66
67
68
# File 'lib/haplocheirus/thrift/timeline_store.rb', line 66

def send_filter2(timeline_id, id, max_search)
  send_message('filter2', Filter2_args, :timeline_id => timeline_id, :id => id, :max_search => max_search)
end

#send_get(timeline_id, offset, length, dedupe) ⇒ Object



82
83
84
# File 'lib/haplocheirus/thrift/timeline_store.rb', line 82

def send_get(timeline_id, offset, length, dedupe)
  send_message('get', Get_args, :timeline_id => timeline_id, :offset => offset, :length => length, :dedupe => dedupe)
end

#send_get_multi(gets) ⇒ Object



98
99
100
# File 'lib/haplocheirus/thrift/timeline_store.rb', line 98

def send_get_multi(gets)
  send_message('get_multi', Get_multi_args, :gets => gets)
end

#send_get_range(timeline_id, from_id, to_id, dedupe) ⇒ Object



113
114
115
# File 'lib/haplocheirus/thrift/timeline_store.rb', line 113

def send_get_range(timeline_id, from_id, to_id, dedupe)
  send_message('get_range', Get_range_args, :timeline_id => timeline_id, :from_id => from_id, :to_id => to_id, :dedupe => dedupe)
end

#send_get_range_multi(get_ranges) ⇒ Object



129
130
131
# File 'lib/haplocheirus/thrift/timeline_store.rb', line 129

def send_get_range_multi(get_ranges)
  send_message('get_range_multi', Get_range_multi_args, :get_ranges => get_ranges)
end

#send_merge(timeline_id, entries) ⇒ Object



159
160
161
# File 'lib/haplocheirus/thrift/timeline_store.rb', line 159

def send_merge(timeline_id, entries)
  send_message('merge', Merge_args, :timeline_id => timeline_id, :entries => entries)
end

#send_merge_indirect(dest_timeline_id, source_timeline_id) ⇒ Object



189
190
191
# File 'lib/haplocheirus/thrift/timeline_store.rb', line 189

def send_merge_indirect(dest_timeline_id, source_timeline_id)
  send_message('merge_indirect', Merge_indirect_args, :dest_timeline_id => dest_timeline_id, :source_timeline_id => source_timeline_id)
end

#send_remove(entry, timeline_prefix, timeline_ids) ⇒ Object



35
36
37
# File 'lib/haplocheirus/thrift/timeline_store.rb', line 35

def send_remove(entry, timeline_prefix, timeline_ids)
  send_message('remove', Remove_args, :entry => entry, :timeline_prefix => timeline_prefix, :timeline_ids => timeline_ids)
end

#send_store(timeline_id, entries) ⇒ Object



144
145
146
# File 'lib/haplocheirus/thrift/timeline_store.rb', line 144

def send_store(timeline_id, entries)
  send_message('store', Store_args, :timeline_id => timeline_id, :entries => entries)
end

#send_unmerge(timeline_id, entries) ⇒ Object



174
175
176
# File 'lib/haplocheirus/thrift/timeline_store.rb', line 174

def send_unmerge(timeline_id, entries)
  send_message('unmerge', Unmerge_args, :timeline_id => timeline_id, :entries => entries)
end

#send_unmerge_indirect(dest_timeline_id, source_timeline_id) ⇒ Object



205
206
207
# File 'lib/haplocheirus/thrift/timeline_store.rb', line 205

def send_unmerge_indirect(dest_timeline_id, source_timeline_id)
  send_message('unmerge_indirect', Unmerge_indirect_args, :dest_timeline_id => dest_timeline_id, :source_timeline_id => source_timeline_id)
end

#store(timeline_id, entries) ⇒ Object



139
140
141
142
# File 'lib/haplocheirus/thrift/timeline_store.rb', line 139

def store(timeline_id, entries)
  send_store(timeline_id, entries)
  recv_store()
end

#unmerge(timeline_id, entries) ⇒ Object



169
170
171
172
# File 'lib/haplocheirus/thrift/timeline_store.rb', line 169

def unmerge(timeline_id, entries)
  send_unmerge(timeline_id, entries)
  recv_unmerge()
end

#unmerge_indirect(dest_timeline_id, source_timeline_id) ⇒ Object



200
201
202
203
# File 'lib/haplocheirus/thrift/timeline_store.rb', line 200

def unmerge_indirect(dest_timeline_id, source_timeline_id)
  send_unmerge_indirect(dest_timeline_id, source_timeline_id)
  return recv_unmerge_indirect()
end