flockdb 0.4.2 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -4,9 +4,9 @@
4
4
  # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
5
  #
6
6
 
7
- module Flock
8
- CursorStart = -1
9
-
10
- CursorEnd = 0
7
+ require 'flockdb_types'
11
8
 
9
+ module Flock
10
+ module Edges
11
+ end
12
12
  end
@@ -0,0 +1,280 @@
1
+ #
2
+ # Autogenerated by Thrift
3
+ #
4
+ # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
+ #
6
+
7
+
8
+ module Flock
9
+ module Edges
10
+ module SelectOperationType
11
+ SimpleQuery = 1
12
+ Intersection = 2
13
+ Union = 3
14
+ Difference = 4
15
+ VALUE_MAP = {1 => "SimpleQuery", 2 => "Intersection", 3 => "Union", 4 => "Difference"}
16
+ VALID_VALUES = Set.new([SimpleQuery, Intersection, Union, Difference]).freeze
17
+ end
18
+
19
+ module ExecuteOperationType
20
+ Add = 1
21
+ Remove = 2
22
+ Archive = 3
23
+ Negate = 4
24
+ VALUE_MAP = {1 => "Add", 2 => "Remove", 3 => "Archive", 4 => "Negate"}
25
+ VALID_VALUES = Set.new([Add, Remove, Archive, Negate]).freeze
26
+ end
27
+
28
+ module EdgeState
29
+ Positive = 0
30
+ Negative = 3
31
+ Removed = 1
32
+ Archived = 2
33
+ VALUE_MAP = {0 => "Positive", 3 => "Negative", 1 => "Removed", 2 => "Archived"}
34
+ VALID_VALUES = Set.new([Positive, Negative, Removed, Archived]).freeze
35
+ end
36
+
37
+ module Priority
38
+ Low = 1
39
+ Medium = 2
40
+ High = 3
41
+ VALUE_MAP = {1 => "Low", 2 => "Medium", 3 => "High"}
42
+ VALID_VALUES = Set.new([Low, Medium, High]).freeze
43
+ end
44
+
45
+ class FlockException < ::Thrift::Exception
46
+ include ::Thrift::Struct
47
+ def initialize(message=nil)
48
+ super()
49
+ self.description = message
50
+ end
51
+
52
+ def message; description end
53
+
54
+ DESCRIPTION = 1
55
+
56
+ ::Thrift::Struct.field_accessor self, :description
57
+ FIELDS = {
58
+ DESCRIPTION => {:type => ::Thrift::Types::STRING, :name => 'description'}
59
+ }
60
+
61
+ def struct_fields; FIELDS; end
62
+
63
+ def validate
64
+ end
65
+
66
+ end
67
+
68
+ class Results
69
+ include ::Thrift::Struct
70
+ IDS = 1
71
+ NEXT_CURSOR = 2
72
+ PREV_CURSOR = 3
73
+
74
+ ::Thrift::Struct.field_accessor self, :ids, :next_cursor, :prev_cursor
75
+ FIELDS = {
76
+ IDS => {:type => ::Thrift::Types::STRING, :name => 'ids'},
77
+ NEXT_CURSOR => {:type => ::Thrift::Types::I64, :name => 'next_cursor'},
78
+ PREV_CURSOR => {:type => ::Thrift::Types::I64, :name => 'prev_cursor'}
79
+ }
80
+
81
+ def struct_fields; FIELDS; end
82
+
83
+ def validate
84
+ end
85
+
86
+ end
87
+
88
+ class Page
89
+ include ::Thrift::Struct
90
+ COUNT = 1
91
+ CURSOR = 2
92
+
93
+ ::Thrift::Struct.field_accessor self, :count, :cursor
94
+ FIELDS = {
95
+ COUNT => {:type => ::Thrift::Types::I32, :name => 'count'},
96
+ CURSOR => {:type => ::Thrift::Types::I64, :name => 'cursor'}
97
+ }
98
+
99
+ def struct_fields; FIELDS; end
100
+
101
+ def validate
102
+ end
103
+
104
+ end
105
+
106
+ class Edge
107
+ include ::Thrift::Struct
108
+ SOURCE_ID = 1
109
+ DESTINATION_ID = 2
110
+ POSITION = 3
111
+ UPDATED_AT = 4
112
+ COUNT = 5
113
+ STATE_ID = 6
114
+
115
+ ::Thrift::Struct.field_accessor self, :source_id, :destination_id, :position, :updated_at, :count, :state_id
116
+ FIELDS = {
117
+ SOURCE_ID => {:type => ::Thrift::Types::I64, :name => 'source_id'},
118
+ DESTINATION_ID => {:type => ::Thrift::Types::I64, :name => 'destination_id'},
119
+ POSITION => {:type => ::Thrift::Types::I64, :name => 'position'},
120
+ UPDATED_AT => {:type => ::Thrift::Types::I32, :name => 'updated_at'},
121
+ COUNT => {:type => ::Thrift::Types::I32, :name => 'count'},
122
+ STATE_ID => {:type => ::Thrift::Types::I32, :name => 'state_id'}
123
+ }
124
+
125
+ def struct_fields; FIELDS; end
126
+
127
+ def validate
128
+ end
129
+
130
+ end
131
+
132
+ class QueryTerm
133
+ include ::Thrift::Struct
134
+ SOURCE_ID = 1
135
+ GRAPH_ID = 2
136
+ IS_FORWARD = 3
137
+ DESTINATION_IDS = 4
138
+ STATE_IDS = 5
139
+
140
+ ::Thrift::Struct.field_accessor self, :source_id, :graph_id, :is_forward, :destination_ids, :state_ids
141
+ FIELDS = {
142
+ SOURCE_ID => {:type => ::Thrift::Types::I64, :name => 'source_id'},
143
+ GRAPH_ID => {:type => ::Thrift::Types::I32, :name => 'graph_id'},
144
+ IS_FORWARD => {:type => ::Thrift::Types::BOOL, :name => 'is_forward'},
145
+ DESTINATION_IDS => {:type => ::Thrift::Types::STRING, :name => 'destination_ids', :optional => true},
146
+ STATE_IDS => {:type => ::Thrift::Types::LIST, :name => 'state_ids', :element => {:type => ::Thrift::Types::I32}, :optional => true}
147
+ }
148
+
149
+ def struct_fields; FIELDS; end
150
+
151
+ def validate
152
+ end
153
+
154
+ end
155
+
156
+ class SelectOperation
157
+ include ::Thrift::Struct
158
+ OPERATION_TYPE = 1
159
+ TERM = 2
160
+
161
+ ::Thrift::Struct.field_accessor self, :operation_type, :term
162
+ FIELDS = {
163
+ OPERATION_TYPE => {:type => ::Thrift::Types::I32, :name => 'operation_type', :enum_class => Flock::Edges::SelectOperationType},
164
+ TERM => {:type => ::Thrift::Types::STRUCT, :name => 'term', :class => Flock::Edges::QueryTerm, :optional => true}
165
+ }
166
+
167
+ def struct_fields; FIELDS; end
168
+
169
+ def validate
170
+ unless @operation_type.nil? || Flock::Edges::SelectOperationType::VALID_VALUES.include?(@operation_type)
171
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field operation_type!')
172
+ end
173
+ end
174
+
175
+ end
176
+
177
+ class ExecuteOperation
178
+ include ::Thrift::Struct
179
+ OPERATION_TYPE = 1
180
+ TERM = 2
181
+ POSITION = 3
182
+
183
+ ::Thrift::Struct.field_accessor self, :operation_type, :term, :position
184
+ FIELDS = {
185
+ OPERATION_TYPE => {:type => ::Thrift::Types::I32, :name => 'operation_type', :enum_class => Flock::Edges::ExecuteOperationType},
186
+ TERM => {:type => ::Thrift::Types::STRUCT, :name => 'term', :class => Flock::Edges::QueryTerm},
187
+ POSITION => {:type => ::Thrift::Types::I64, :name => 'position', :optional => true}
188
+ }
189
+
190
+ def struct_fields; FIELDS; end
191
+
192
+ def validate
193
+ unless @operation_type.nil? || Flock::Edges::ExecuteOperationType::VALID_VALUES.include?(@operation_type)
194
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field operation_type!')
195
+ end
196
+ end
197
+
198
+ end
199
+
200
+ class ExecuteOperations
201
+ include ::Thrift::Struct
202
+ OPERATIONS = 1
203
+ EXECUTE_AT = 2
204
+ PRIORITY = 3
205
+
206
+ ::Thrift::Struct.field_accessor self, :operations, :execute_at, :priority
207
+ FIELDS = {
208
+ OPERATIONS => {:type => ::Thrift::Types::LIST, :name => 'operations', :element => {:type => ::Thrift::Types::STRUCT, :class => Flock::Edges::ExecuteOperation}},
209
+ EXECUTE_AT => {:type => ::Thrift::Types::I32, :name => 'execute_at', :optional => true},
210
+ PRIORITY => {:type => ::Thrift::Types::I32, :name => 'priority', :enum_class => Flock::Edges::Priority}
211
+ }
212
+
213
+ def struct_fields; FIELDS; end
214
+
215
+ def validate
216
+ unless @priority.nil? || Flock::Edges::Priority::VALID_VALUES.include?(@priority)
217
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field priority!')
218
+ end
219
+ end
220
+
221
+ end
222
+
223
+ class SelectQuery
224
+ include ::Thrift::Struct
225
+ OPERATIONS = 1
226
+ PAGE = 2
227
+
228
+ ::Thrift::Struct.field_accessor self, :operations, :page
229
+ FIELDS = {
230
+ OPERATIONS => {:type => ::Thrift::Types::LIST, :name => 'operations', :element => {:type => ::Thrift::Types::STRUCT, :class => Flock::Edges::SelectOperation}},
231
+ PAGE => {:type => ::Thrift::Types::STRUCT, :name => 'page', :class => Flock::Edges::Page}
232
+ }
233
+
234
+ def struct_fields; FIELDS; end
235
+
236
+ def validate
237
+ end
238
+
239
+ end
240
+
241
+ class EdgeQuery
242
+ include ::Thrift::Struct
243
+ TERM = 1
244
+ PAGE = 2
245
+
246
+ ::Thrift::Struct.field_accessor self, :term, :page
247
+ FIELDS = {
248
+ TERM => {:type => ::Thrift::Types::STRUCT, :name => 'term', :class => Flock::Edges::QueryTerm},
249
+ PAGE => {:type => ::Thrift::Types::STRUCT, :name => 'page', :class => Flock::Edges::Page}
250
+ }
251
+
252
+ def struct_fields; FIELDS; end
253
+
254
+ def validate
255
+ end
256
+
257
+ end
258
+
259
+ class EdgeResults
260
+ include ::Thrift::Struct
261
+ EDGES = 1
262
+ NEXT_CURSOR = 2
263
+ PREV_CURSOR = 3
264
+
265
+ ::Thrift::Struct.field_accessor self, :edges, :next_cursor, :prev_cursor
266
+ FIELDS = {
267
+ EDGES => {:type => ::Thrift::Types::LIST, :name => 'edges', :element => {:type => ::Thrift::Types::STRUCT, :class => Flock::Edges::Edge}},
268
+ NEXT_CURSOR => {:type => ::Thrift::Types::I64, :name => 'next_cursor'},
269
+ PREV_CURSOR => {:type => ::Thrift::Types::I64, :name => 'prev_cursor'}
270
+ }
271
+
272
+ def struct_fields; FIELDS; end
273
+
274
+ def validate
275
+ end
276
+
277
+ end
278
+
279
+ end
280
+ end
@@ -1,5 +1,6 @@
1
1
  module Flock
2
- class MockService
2
+ module MockService
3
+ extend self
3
4
 
4
5
  EXEC_OPS = {
5
6
  Edges::ExecuteOperationType::Add => :add,
@@ -1,3 +1,4 @@
1
+
1
2
  module Flock
2
3
  class SelectOperation
3
4
  [:each, :paginate, :to_ary, :size, :first].each do |method|
@@ -10,7 +10,7 @@ module Flock
10
10
  servers = Array(servers)
11
11
  end
12
12
 
13
- super(Edges::Client, servers, DEFAULTS.merge(options))
13
+ super(Edges::FlockDB::Client, servers, DEFAULTS.merge(options))
14
14
  end
15
15
  end
16
16
  end
@@ -0,0 +1,2 @@
1
+ $: << File.join(File.dirname(__FILE__), "gen-rb")
2
+ require "flock_d_b"
@@ -16,15 +16,6 @@ describe Flock do
16
16
  it 'works' do
17
17
  flock.contains(1,1,2).should == true
18
18
  end
19
-
20
- it 'works within nested transactions' do
21
- flock.transaction do
22
- flock.transaction do |f|
23
- f.add(1,1,5)
24
- end
25
- end
26
- flock.contains(1,1,5).should == true
27
- end
28
19
  end
29
20
 
30
21
  describe 'remove' do
@@ -7,15 +7,13 @@ $: << File.expand_path("#{spec_dir}/../lib")
7
7
  require 'flock'
8
8
  require 'flock/mock_service'
9
9
 
10
- $mock_service = Flock::MockService.new
11
-
12
10
  Spec::Runner.configure do |config|
13
11
  config.mock_with :rr
14
12
  config.before do
15
- $mock_service.clear
13
+ Flock::MockService.clear
16
14
  end
17
15
  end
18
16
 
19
17
  def new_flock_client
20
- Flock.new($mock_service)
18
+ Flock.new(Flock::MockService)
21
19
  end
metadata CHANGED
@@ -5,9 +5,9 @@ version: !ruby/object:Gem::Version
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
- - 4
9
- - 2
10
- version: 0.4.2
8
+ - 5
9
+ - 0
10
+ version: 0.5.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Matt Freels
@@ -17,7 +17,7 @@ autorequire:
17
17
  bindir: bin
18
18
  cert_chain: []
19
19
 
20
- date: 2011-02-28 00:00:00 -08:00
20
+ date: 2010-10-19 00:00:00 -07:00
21
21
  default_executable:
22
22
  dependencies:
23
23
  - !ruby/object:Gem::Dependency
@@ -98,6 +98,9 @@ files:
98
98
  - flockdb.gemspec
99
99
  - lib/flock.rb
100
100
  - lib/flock/client.rb
101
+ - lib/flock/gen-rb/flock_d_b.rb
102
+ - lib/flock/gen-rb/flockdb_constants.rb
103
+ - lib/flock/gen-rb/flockdb_types.rb
101
104
  - lib/flock/mixins/sizeable.rb
102
105
  - lib/flock/mock_service.rb
103
106
  - lib/flock/operation.rb
@@ -108,11 +111,7 @@ files:
108
111
  - lib/flock/operations/select_operation.rb
109
112
  - lib/flock/operations/simple_operation.rb
110
113
  - lib/flock/service.rb
111
- - lib/flock/thrift/edges.rb
112
- - lib/flock/thrift/edges_types.rb
113
- - lib/flock/thrift/flock_constants.rb
114
- - lib/flock/thrift/flock_types.rb
115
- - lib/flock/thrift/shards.rb
114
+ - lib/flock/thrift.rb
116
115
  - lib/flockdb.rb
117
116
  - spec/execute_operations_spec.rb
118
117
  - spec/flock_spec.rb
@@ -1,1445 +0,0 @@
1
- #
2
- # Autogenerated by Thrift
3
- #
4
- # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
- #
6
-
7
- module Flock
8
- module Edges
9
- class Client < Flock::Shards::Client
10
- include ::Thrift::Client
11
-
12
- def counts_of_destinations_for(source_ids, graph_id)
13
- send_counts_of_destinations_for(source_ids, graph_id)
14
- return recv_counts_of_destinations_for()
15
- end
16
-
17
- def send_counts_of_destinations_for(source_ids, graph_id)
18
- send_message('counts_of_destinations_for', Counts_of_destinations_for_args, :source_ids => source_ids, :graph_id => graph_id)
19
- end
20
-
21
- def recv_counts_of_destinations_for()
22
- result = receive_message(Counts_of_destinations_for_result)
23
- return result.success unless result.success.nil?
24
- raise result.ex unless result.ex.nil?
25
- raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'counts_of_destinations_for failed: unknown result')
26
- end
27
-
28
- def counts_of_sources_for(destination_ids, graph_id)
29
- send_counts_of_sources_for(destination_ids, graph_id)
30
- return recv_counts_of_sources_for()
31
- end
32
-
33
- def send_counts_of_sources_for(destination_ids, graph_id)
34
- send_message('counts_of_sources_for', Counts_of_sources_for_args, :destination_ids => destination_ids, :graph_id => graph_id)
35
- end
36
-
37
- def recv_counts_of_sources_for()
38
- result = receive_message(Counts_of_sources_for_result)
39
- return result.success unless result.success.nil?
40
- raise result.ex unless result.ex.nil?
41
- raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'counts_of_sources_for failed: unknown result')
42
- end
43
-
44
- def add(source_id, graph_id, destination_id)
45
- send_add(source_id, graph_id, destination_id)
46
- recv_add()
47
- end
48
-
49
- def send_add(source_id, graph_id, destination_id)
50
- send_message('add', Add_args, :source_id => source_id, :graph_id => graph_id, :destination_id => destination_id)
51
- end
52
-
53
- def recv_add()
54
- result = receive_message(Add_result)
55
- raise result.ex unless result.ex.nil?
56
- return
57
- end
58
-
59
- def remove(source_id, graph_id, destination_id)
60
- send_remove(source_id, graph_id, destination_id)
61
- recv_remove()
62
- end
63
-
64
- def send_remove(source_id, graph_id, destination_id)
65
- send_message('remove', Remove_args, :source_id => source_id, :graph_id => graph_id, :destination_id => destination_id)
66
- end
67
-
68
- def recv_remove()
69
- result = receive_message(Remove_result)
70
- raise result.ex unless result.ex.nil?
71
- return
72
- end
73
-
74
- def archive(source_id)
75
- send_archive(source_id)
76
- recv_archive()
77
- end
78
-
79
- def send_archive(source_id)
80
- send_message('archive', Archive_args, :source_id => source_id)
81
- end
82
-
83
- def recv_archive()
84
- result = receive_message(Archive_result)
85
- raise result.ex unless result.ex.nil?
86
- return
87
- end
88
-
89
- def unarchive(source_id)
90
- send_unarchive(source_id)
91
- recv_unarchive()
92
- end
93
-
94
- def send_unarchive(source_id)
95
- send_message('unarchive', Unarchive_args, :source_id => source_id)
96
- end
97
-
98
- def recv_unarchive()
99
- result = receive_message(Unarchive_result)
100
- raise result.ex unless result.ex.nil?
101
- return
102
- end
103
-
104
- def add_at(source_id, graph_id, destination_id, updated_at)
105
- send_add_at(source_id, graph_id, destination_id, updated_at)
106
- recv_add_at()
107
- end
108
-
109
- def send_add_at(source_id, graph_id, destination_id, updated_at)
110
- send_message('add_at', Add_at_args, :source_id => source_id, :graph_id => graph_id, :destination_id => destination_id, :updated_at => updated_at)
111
- end
112
-
113
- def recv_add_at()
114
- result = receive_message(Add_at_result)
115
- raise result.ex unless result.ex.nil?
116
- return
117
- end
118
-
119
- def remove_at(source_id, graph_id, destination_id, updated_at)
120
- send_remove_at(source_id, graph_id, destination_id, updated_at)
121
- recv_remove_at()
122
- end
123
-
124
- def send_remove_at(source_id, graph_id, destination_id, updated_at)
125
- send_message('remove_at', Remove_at_args, :source_id => source_id, :graph_id => graph_id, :destination_id => destination_id, :updated_at => updated_at)
126
- end
127
-
128
- def recv_remove_at()
129
- result = receive_message(Remove_at_result)
130
- raise result.ex unless result.ex.nil?
131
- return
132
- end
133
-
134
- def contains(source_id, graph_id, destination_id)
135
- send_contains(source_id, graph_id, destination_id)
136
- return recv_contains()
137
- end
138
-
139
- def send_contains(source_id, graph_id, destination_id)
140
- send_message('contains', Contains_args, :source_id => source_id, :graph_id => graph_id, :destination_id => destination_id)
141
- end
142
-
143
- def recv_contains()
144
- result = receive_message(Contains_result)
145
- return result.success unless result.success.nil?
146
- raise result.ex unless result.ex.nil?
147
- raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'contains failed: unknown result')
148
- end
149
-
150
- def get(source_id, graph_id, destination_id)
151
- send_get(source_id, graph_id, destination_id)
152
- return recv_get()
153
- end
154
-
155
- def send_get(source_id, graph_id, destination_id)
156
- send_message('get', Get_args, :source_id => source_id, :graph_id => graph_id, :destination_id => destination_id)
157
- end
158
-
159
- def recv_get()
160
- result = receive_message(Get_result)
161
- return result.success unless result.success.nil?
162
- raise result.ex unless result.ex.nil?
163
- raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get failed: unknown result')
164
- end
165
-
166
- def retry_errors()
167
- send_retry_errors()
168
- recv_retry_errors()
169
- end
170
-
171
- def send_retry_errors()
172
- send_message('retry_errors', Retry_errors_args)
173
- end
174
-
175
- def recv_retry_errors()
176
- result = receive_message(Retry_errors_result)
177
- raise result.ex unless result.ex.nil?
178
- return
179
- end
180
-
181
- def retry_migrate_errors()
182
- send_retry_migrate_errors()
183
- recv_retry_migrate_errors()
184
- end
185
-
186
- def send_retry_migrate_errors()
187
- send_message('retry_migrate_errors', Retry_migrate_errors_args)
188
- end
189
-
190
- def recv_retry_migrate_errors()
191
- result = receive_message(Retry_migrate_errors_result)
192
- raise result.ex unless result.ex.nil?
193
- return
194
- end
195
-
196
- def stop_writes()
197
- send_stop_writes()
198
- recv_stop_writes()
199
- end
200
-
201
- def send_stop_writes()
202
- send_message('stop_writes', Stop_writes_args)
203
- end
204
-
205
- def recv_stop_writes()
206
- result = receive_message(Stop_writes_result)
207
- raise result.ex unless result.ex.nil?
208
- return
209
- end
210
-
211
- def resume_writes()
212
- send_resume_writes()
213
- recv_resume_writes()
214
- end
215
-
216
- def send_resume_writes()
217
- send_message('resume_writes', Resume_writes_args)
218
- end
219
-
220
- def recv_resume_writes()
221
- result = receive_message(Resume_writes_result)
222
- raise result.ex unless result.ex.nil?
223
- return
224
- end
225
-
226
- def stop_writes_for(priority)
227
- send_stop_writes_for(priority)
228
- recv_stop_writes_for()
229
- end
230
-
231
- def send_stop_writes_for(priority)
232
- send_message('stop_writes_for', Stop_writes_for_args, :priority => priority)
233
- end
234
-
235
- def recv_stop_writes_for()
236
- result = receive_message(Stop_writes_for_result)
237
- raise result.ex unless result.ex.nil?
238
- return
239
- end
240
-
241
- def resume_writes_for(priority)
242
- send_resume_writes_for(priority)
243
- recv_resume_writes_for()
244
- end
245
-
246
- def send_resume_writes_for(priority)
247
- send_message('resume_writes_for', Resume_writes_for_args, :priority => priority)
248
- end
249
-
250
- def recv_resume_writes_for()
251
- result = receive_message(Resume_writes_for_result)
252
- raise result.ex unless result.ex.nil?
253
- return
254
- end
255
-
256
- def is_writing(priority)
257
- send_is_writing(priority)
258
- return recv_is_writing()
259
- end
260
-
261
- def send_is_writing(priority)
262
- send_message('is_writing', Is_writing_args, :priority => priority)
263
- end
264
-
265
- def recv_is_writing()
266
- result = receive_message(Is_writing_result)
267
- return result.success unless result.success.nil?
268
- raise result.ex unless result.ex.nil?
269
- raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'is_writing failed: unknown result')
270
- end
271
-
272
- def inject_job(priority, job)
273
- send_inject_job(priority, job)
274
- recv_inject_job()
275
- end
276
-
277
- def send_inject_job(priority, job)
278
- send_message('inject_job', Inject_job_args, :priority => priority, :job => job)
279
- end
280
-
281
- def recv_inject_job()
282
- result = receive_message(Inject_job_result)
283
- raise result.ex unless result.ex.nil?
284
- return
285
- end
286
-
287
- def select(operations, page)
288
- send_select(operations, page)
289
- return recv_select()
290
- end
291
-
292
- def send_select(operations, page)
293
- send_message('select', Select_args, :operations => operations, :page => page)
294
- end
295
-
296
- def recv_select()
297
- result = receive_message(Select_result)
298
- return result.success unless result.success.nil?
299
- raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'select failed: unknown result')
300
- end
301
-
302
- def select2(queries)
303
- send_select2(queries)
304
- return recv_select2()
305
- end
306
-
307
- def send_select2(queries)
308
- send_message('select2', Select2_args, :queries => queries)
309
- end
310
-
311
- def recv_select2()
312
- result = receive_message(Select2_result)
313
- return result.success unless result.success.nil?
314
- raise result.ex unless result.ex.nil?
315
- raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'select2 failed: unknown result')
316
- end
317
-
318
- def select_edges(queries)
319
- send_select_edges(queries)
320
- return recv_select_edges()
321
- end
322
-
323
- def send_select_edges(queries)
324
- send_message('select_edges', Select_edges_args, :queries => queries)
325
- end
326
-
327
- def recv_select_edges()
328
- result = receive_message(Select_edges_result)
329
- return result.success unless result.success.nil?
330
- raise result.ex unless result.ex.nil?
331
- raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'select_edges failed: unknown result')
332
- end
333
-
334
- def execute(operations)
335
- send_execute(operations)
336
- recv_execute()
337
- end
338
-
339
- def send_execute(operations)
340
- send_message('execute', Execute_args, :operations => operations)
341
- end
342
-
343
- def recv_execute()
344
- result = receive_message(Execute_result)
345
- return
346
- end
347
-
348
- def count(operations)
349
- send_count(operations)
350
- return recv_count()
351
- end
352
-
353
- def send_count(operations)
354
- send_message('count', Count_args, :operations => operations)
355
- end
356
-
357
- def recv_count()
358
- result = receive_message(Count_result)
359
- return result.success unless result.success.nil?
360
- raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'count failed: unknown result')
361
- end
362
-
363
- def count2(queries)
364
- send_count2(queries)
365
- return recv_count2()
366
- end
367
-
368
- def send_count2(queries)
369
- send_message('count2', Count2_args, :queries => queries)
370
- end
371
-
372
- def recv_count2()
373
- result = receive_message(Count2_result)
374
- return result.success unless result.success.nil?
375
- raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'count2 failed: unknown result')
376
- end
377
-
378
- end
379
-
380
- class Processor < Flock::Shards::Processor
381
- include ::Thrift::Processor
382
-
383
- def process_counts_of_destinations_for(seqid, iprot, oprot)
384
- args = read_args(iprot, Counts_of_destinations_for_args)
385
- result = Counts_of_destinations_for_result.new()
386
- begin
387
- result.success = @handler.counts_of_destinations_for(args.source_ids, args.graph_id)
388
- rescue Flock::FlockException => ex
389
- result.ex = ex
390
- end
391
- write_result(result, oprot, 'counts_of_destinations_for', seqid)
392
- end
393
-
394
- def process_counts_of_sources_for(seqid, iprot, oprot)
395
- args = read_args(iprot, Counts_of_sources_for_args)
396
- result = Counts_of_sources_for_result.new()
397
- begin
398
- result.success = @handler.counts_of_sources_for(args.destination_ids, args.graph_id)
399
- rescue Flock::FlockException => ex
400
- result.ex = ex
401
- end
402
- write_result(result, oprot, 'counts_of_sources_for', seqid)
403
- end
404
-
405
- def process_add(seqid, iprot, oprot)
406
- args = read_args(iprot, Add_args)
407
- result = Add_result.new()
408
- begin
409
- @handler.add(args.source_id, args.graph_id, args.destination_id)
410
- rescue Flock::FlockException => ex
411
- result.ex = ex
412
- end
413
- write_result(result, oprot, 'add', seqid)
414
- end
415
-
416
- def process_remove(seqid, iprot, oprot)
417
- args = read_args(iprot, Remove_args)
418
- result = Remove_result.new()
419
- begin
420
- @handler.remove(args.source_id, args.graph_id, args.destination_id)
421
- rescue Flock::FlockException => ex
422
- result.ex = ex
423
- end
424
- write_result(result, oprot, 'remove', seqid)
425
- end
426
-
427
- def process_archive(seqid, iprot, oprot)
428
- args = read_args(iprot, Archive_args)
429
- result = Archive_result.new()
430
- begin
431
- @handler.archive(args.source_id)
432
- rescue Flock::FlockException => ex
433
- result.ex = ex
434
- end
435
- write_result(result, oprot, 'archive', seqid)
436
- end
437
-
438
- def process_unarchive(seqid, iprot, oprot)
439
- args = read_args(iprot, Unarchive_args)
440
- result = Unarchive_result.new()
441
- begin
442
- @handler.unarchive(args.source_id)
443
- rescue Flock::FlockException => ex
444
- result.ex = ex
445
- end
446
- write_result(result, oprot, 'unarchive', seqid)
447
- end
448
-
449
- def process_add_at(seqid, iprot, oprot)
450
- args = read_args(iprot, Add_at_args)
451
- result = Add_at_result.new()
452
- begin
453
- @handler.add_at(args.source_id, args.graph_id, args.destination_id, args.updated_at)
454
- rescue Flock::FlockException => ex
455
- result.ex = ex
456
- end
457
- write_result(result, oprot, 'add_at', seqid)
458
- end
459
-
460
- def process_remove_at(seqid, iprot, oprot)
461
- args = read_args(iprot, Remove_at_args)
462
- result = Remove_at_result.new()
463
- begin
464
- @handler.remove_at(args.source_id, args.graph_id, args.destination_id, args.updated_at)
465
- rescue Flock::FlockException => ex
466
- result.ex = ex
467
- end
468
- write_result(result, oprot, 'remove_at', seqid)
469
- end
470
-
471
- def process_contains(seqid, iprot, oprot)
472
- args = read_args(iprot, Contains_args)
473
- result = Contains_result.new()
474
- begin
475
- result.success = @handler.contains(args.source_id, args.graph_id, args.destination_id)
476
- rescue Flock::FlockException => ex
477
- result.ex = ex
478
- end
479
- write_result(result, oprot, 'contains', seqid)
480
- end
481
-
482
- def process_get(seqid, iprot, oprot)
483
- args = read_args(iprot, Get_args)
484
- result = Get_result.new()
485
- begin
486
- result.success = @handler.get(args.source_id, args.graph_id, args.destination_id)
487
- rescue Flock::FlockException => ex
488
- result.ex = ex
489
- end
490
- write_result(result, oprot, 'get', seqid)
491
- end
492
-
493
- def process_retry_errors(seqid, iprot, oprot)
494
- args = read_args(iprot, Retry_errors_args)
495
- result = Retry_errors_result.new()
496
- begin
497
- @handler.retry_errors()
498
- rescue Flock::FlockException => ex
499
- result.ex = ex
500
- end
501
- write_result(result, oprot, 'retry_errors', seqid)
502
- end
503
-
504
- def process_retry_migrate_errors(seqid, iprot, oprot)
505
- args = read_args(iprot, Retry_migrate_errors_args)
506
- result = Retry_migrate_errors_result.new()
507
- begin
508
- @handler.retry_migrate_errors()
509
- rescue Flock::FlockException => ex
510
- result.ex = ex
511
- end
512
- write_result(result, oprot, 'retry_migrate_errors', seqid)
513
- end
514
-
515
- def process_stop_writes(seqid, iprot, oprot)
516
- args = read_args(iprot, Stop_writes_args)
517
- result = Stop_writes_result.new()
518
- begin
519
- @handler.stop_writes()
520
- rescue Flock::FlockException => ex
521
- result.ex = ex
522
- end
523
- write_result(result, oprot, 'stop_writes', seqid)
524
- end
525
-
526
- def process_resume_writes(seqid, iprot, oprot)
527
- args = read_args(iprot, Resume_writes_args)
528
- result = Resume_writes_result.new()
529
- begin
530
- @handler.resume_writes()
531
- rescue Flock::FlockException => ex
532
- result.ex = ex
533
- end
534
- write_result(result, oprot, 'resume_writes', seqid)
535
- end
536
-
537
- def process_stop_writes_for(seqid, iprot, oprot)
538
- args = read_args(iprot, Stop_writes_for_args)
539
- result = Stop_writes_for_result.new()
540
- begin
541
- @handler.stop_writes_for(args.priority)
542
- rescue Flock::FlockException => ex
543
- result.ex = ex
544
- end
545
- write_result(result, oprot, 'stop_writes_for', seqid)
546
- end
547
-
548
- def process_resume_writes_for(seqid, iprot, oprot)
549
- args = read_args(iprot, Resume_writes_for_args)
550
- result = Resume_writes_for_result.new()
551
- begin
552
- @handler.resume_writes_for(args.priority)
553
- rescue Flock::FlockException => ex
554
- result.ex = ex
555
- end
556
- write_result(result, oprot, 'resume_writes_for', seqid)
557
- end
558
-
559
- def process_is_writing(seqid, iprot, oprot)
560
- args = read_args(iprot, Is_writing_args)
561
- result = Is_writing_result.new()
562
- begin
563
- result.success = @handler.is_writing(args.priority)
564
- rescue Flock::FlockException => ex
565
- result.ex = ex
566
- end
567
- write_result(result, oprot, 'is_writing', seqid)
568
- end
569
-
570
- def process_inject_job(seqid, iprot, oprot)
571
- args = read_args(iprot, Inject_job_args)
572
- result = Inject_job_result.new()
573
- begin
574
- @handler.inject_job(args.priority, args.job)
575
- rescue Flock::FlockException => ex
576
- result.ex = ex
577
- end
578
- write_result(result, oprot, 'inject_job', seqid)
579
- end
580
-
581
- def process_select(seqid, iprot, oprot)
582
- args = read_args(iprot, Select_args)
583
- result = Select_result.new()
584
- result.success = @handler.select(args.operations, args.page)
585
- write_result(result, oprot, 'select', seqid)
586
- end
587
-
588
- def process_select2(seqid, iprot, oprot)
589
- args = read_args(iprot, Select2_args)
590
- result = Select2_result.new()
591
- begin
592
- result.success = @handler.select2(args.queries)
593
- rescue Flock::FlockException => ex
594
- result.ex = ex
595
- end
596
- write_result(result, oprot, 'select2', seqid)
597
- end
598
-
599
- def process_select_edges(seqid, iprot, oprot)
600
- args = read_args(iprot, Select_edges_args)
601
- result = Select_edges_result.new()
602
- begin
603
- result.success = @handler.select_edges(args.queries)
604
- rescue Flock::FlockException => ex
605
- result.ex = ex
606
- end
607
- write_result(result, oprot, 'select_edges', seqid)
608
- end
609
-
610
- def process_execute(seqid, iprot, oprot)
611
- args = read_args(iprot, Execute_args)
612
- result = Execute_result.new()
613
- @handler.execute(args.operations)
614
- write_result(result, oprot, 'execute', seqid)
615
- end
616
-
617
- def process_count(seqid, iprot, oprot)
618
- args = read_args(iprot, Count_args)
619
- result = Count_result.new()
620
- result.success = @handler.count(args.operations)
621
- write_result(result, oprot, 'count', seqid)
622
- end
623
-
624
- def process_count2(seqid, iprot, oprot)
625
- args = read_args(iprot, Count2_args)
626
- result = Count2_result.new()
627
- result.success = @handler.count2(args.queries)
628
- write_result(result, oprot, 'count2', seqid)
629
- end
630
-
631
- end
632
-
633
- # HELPER FUNCTIONS AND STRUCTURES
634
-
635
- class Counts_of_destinations_for_args
636
- include ::Thrift::Struct
637
- SOURCE_IDS = 1
638
- GRAPH_ID = 2
639
-
640
- ::Thrift::Struct.field_accessor self, :source_ids, :graph_id
641
- FIELDS = {
642
- SOURCE_IDS => {:type => ::Thrift::Types::STRING, :name => 'source_ids'},
643
- GRAPH_ID => {:type => ::Thrift::Types::I32, :name => 'graph_id'}
644
- }
645
-
646
- def struct_fields; FIELDS; end
647
-
648
- def validate
649
- end
650
-
651
- end
652
-
653
- class Counts_of_destinations_for_result
654
- include ::Thrift::Struct
655
- SUCCESS = 0
656
- EX = -1
657
-
658
- ::Thrift::Struct.field_accessor self, :success, :ex
659
- FIELDS = {
660
- SUCCESS => {:type => ::Thrift::Types::STRING, :name => 'success'},
661
- EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => Flock::FlockException}
662
- }
663
-
664
- def struct_fields; FIELDS; end
665
-
666
- def validate
667
- end
668
-
669
- end
670
-
671
- class Counts_of_sources_for_args
672
- include ::Thrift::Struct
673
- DESTINATION_IDS = 1
674
- GRAPH_ID = 2
675
-
676
- ::Thrift::Struct.field_accessor self, :destination_ids, :graph_id
677
- FIELDS = {
678
- DESTINATION_IDS => {:type => ::Thrift::Types::STRING, :name => 'destination_ids'},
679
- GRAPH_ID => {:type => ::Thrift::Types::I32, :name => 'graph_id'}
680
- }
681
-
682
- def struct_fields; FIELDS; end
683
-
684
- def validate
685
- end
686
-
687
- end
688
-
689
- class Counts_of_sources_for_result
690
- include ::Thrift::Struct
691
- SUCCESS = 0
692
- EX = -1
693
-
694
- ::Thrift::Struct.field_accessor self, :success, :ex
695
- FIELDS = {
696
- SUCCESS => {:type => ::Thrift::Types::STRING, :name => 'success'},
697
- EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => Flock::FlockException}
698
- }
699
-
700
- def struct_fields; FIELDS; end
701
-
702
- def validate
703
- end
704
-
705
- end
706
-
707
- class Add_args
708
- include ::Thrift::Struct
709
- SOURCE_ID = 1
710
- GRAPH_ID = 2
711
- DESTINATION_ID = 3
712
-
713
- ::Thrift::Struct.field_accessor self, :source_id, :graph_id, :destination_id
714
- FIELDS = {
715
- SOURCE_ID => {:type => ::Thrift::Types::I64, :name => 'source_id'},
716
- GRAPH_ID => {:type => ::Thrift::Types::I32, :name => 'graph_id'},
717
- DESTINATION_ID => {:type => ::Thrift::Types::I64, :name => 'destination_id'}
718
- }
719
-
720
- def struct_fields; FIELDS; end
721
-
722
- def validate
723
- end
724
-
725
- end
726
-
727
- class Add_result
728
- include ::Thrift::Struct
729
- EX = -1
730
-
731
- ::Thrift::Struct.field_accessor self, :ex
732
- FIELDS = {
733
- EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => Flock::FlockException}
734
- }
735
-
736
- def struct_fields; FIELDS; end
737
-
738
- def validate
739
- end
740
-
741
- end
742
-
743
- class Remove_args
744
- include ::Thrift::Struct
745
- SOURCE_ID = 1
746
- GRAPH_ID = 2
747
- DESTINATION_ID = 3
748
-
749
- ::Thrift::Struct.field_accessor self, :source_id, :graph_id, :destination_id
750
- FIELDS = {
751
- SOURCE_ID => {:type => ::Thrift::Types::I64, :name => 'source_id'},
752
- GRAPH_ID => {:type => ::Thrift::Types::I32, :name => 'graph_id'},
753
- DESTINATION_ID => {:type => ::Thrift::Types::I64, :name => 'destination_id'}
754
- }
755
-
756
- def struct_fields; FIELDS; end
757
-
758
- def validate
759
- end
760
-
761
- end
762
-
763
- class Remove_result
764
- include ::Thrift::Struct
765
- EX = -1
766
-
767
- ::Thrift::Struct.field_accessor self, :ex
768
- FIELDS = {
769
- EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => Flock::FlockException}
770
- }
771
-
772
- def struct_fields; FIELDS; end
773
-
774
- def validate
775
- end
776
-
777
- end
778
-
779
- class Archive_args
780
- include ::Thrift::Struct
781
- SOURCE_ID = 1
782
-
783
- ::Thrift::Struct.field_accessor self, :source_id
784
- FIELDS = {
785
- SOURCE_ID => {:type => ::Thrift::Types::I64, :name => 'source_id'}
786
- }
787
-
788
- def struct_fields; FIELDS; end
789
-
790
- def validate
791
- end
792
-
793
- end
794
-
795
- class Archive_result
796
- include ::Thrift::Struct
797
- EX = -1
798
-
799
- ::Thrift::Struct.field_accessor self, :ex
800
- FIELDS = {
801
- EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => Flock::FlockException}
802
- }
803
-
804
- def struct_fields; FIELDS; end
805
-
806
- def validate
807
- end
808
-
809
- end
810
-
811
- class Unarchive_args
812
- include ::Thrift::Struct
813
- SOURCE_ID = 1
814
-
815
- ::Thrift::Struct.field_accessor self, :source_id
816
- FIELDS = {
817
- SOURCE_ID => {:type => ::Thrift::Types::I64, :name => 'source_id'}
818
- }
819
-
820
- def struct_fields; FIELDS; end
821
-
822
- def validate
823
- end
824
-
825
- end
826
-
827
- class Unarchive_result
828
- include ::Thrift::Struct
829
- EX = -1
830
-
831
- ::Thrift::Struct.field_accessor self, :ex
832
- FIELDS = {
833
- EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => Flock::FlockException}
834
- }
835
-
836
- def struct_fields; FIELDS; end
837
-
838
- def validate
839
- end
840
-
841
- end
842
-
843
- class Add_at_args
844
- include ::Thrift::Struct
845
- SOURCE_ID = 1
846
- GRAPH_ID = 2
847
- DESTINATION_ID = 3
848
- UPDATED_AT = 4
849
-
850
- ::Thrift::Struct.field_accessor self, :source_id, :graph_id, :destination_id, :updated_at
851
- FIELDS = {
852
- SOURCE_ID => {:type => ::Thrift::Types::I64, :name => 'source_id'},
853
- GRAPH_ID => {:type => ::Thrift::Types::I32, :name => 'graph_id'},
854
- DESTINATION_ID => {:type => ::Thrift::Types::I64, :name => 'destination_id'},
855
- UPDATED_AT => {:type => ::Thrift::Types::I64, :name => 'updated_at'}
856
- }
857
-
858
- def struct_fields; FIELDS; end
859
-
860
- def validate
861
- end
862
-
863
- end
864
-
865
- class Add_at_result
866
- include ::Thrift::Struct
867
- EX = -1
868
-
869
- ::Thrift::Struct.field_accessor self, :ex
870
- FIELDS = {
871
- EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => Flock::FlockException}
872
- }
873
-
874
- def struct_fields; FIELDS; end
875
-
876
- def validate
877
- end
878
-
879
- end
880
-
881
- class Remove_at_args
882
- include ::Thrift::Struct
883
- SOURCE_ID = 1
884
- GRAPH_ID = 2
885
- DESTINATION_ID = 3
886
- UPDATED_AT = 4
887
-
888
- ::Thrift::Struct.field_accessor self, :source_id, :graph_id, :destination_id, :updated_at
889
- FIELDS = {
890
- SOURCE_ID => {:type => ::Thrift::Types::I64, :name => 'source_id'},
891
- GRAPH_ID => {:type => ::Thrift::Types::I32, :name => 'graph_id'},
892
- DESTINATION_ID => {:type => ::Thrift::Types::I64, :name => 'destination_id'},
893
- UPDATED_AT => {:type => ::Thrift::Types::I64, :name => 'updated_at'}
894
- }
895
-
896
- def struct_fields; FIELDS; end
897
-
898
- def validate
899
- end
900
-
901
- end
902
-
903
- class Remove_at_result
904
- include ::Thrift::Struct
905
- EX = -1
906
-
907
- ::Thrift::Struct.field_accessor self, :ex
908
- FIELDS = {
909
- EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => Flock::FlockException}
910
- }
911
-
912
- def struct_fields; FIELDS; end
913
-
914
- def validate
915
- end
916
-
917
- end
918
-
919
- class Contains_args
920
- include ::Thrift::Struct
921
- SOURCE_ID = 1
922
- GRAPH_ID = 2
923
- DESTINATION_ID = 3
924
-
925
- ::Thrift::Struct.field_accessor self, :source_id, :graph_id, :destination_id
926
- FIELDS = {
927
- SOURCE_ID => {:type => ::Thrift::Types::I64, :name => 'source_id'},
928
- GRAPH_ID => {:type => ::Thrift::Types::I32, :name => 'graph_id'},
929
- DESTINATION_ID => {:type => ::Thrift::Types::I64, :name => 'destination_id'}
930
- }
931
-
932
- def struct_fields; FIELDS; end
933
-
934
- def validate
935
- end
936
-
937
- end
938
-
939
- class Contains_result
940
- include ::Thrift::Struct
941
- SUCCESS = 0
942
- EX = -1
943
-
944
- ::Thrift::Struct.field_accessor self, :success, :ex
945
- FIELDS = {
946
- SUCCESS => {:type => ::Thrift::Types::BOOL, :name => 'success'},
947
- EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => Flock::FlockException}
948
- }
949
-
950
- def struct_fields; FIELDS; end
951
-
952
- def validate
953
- end
954
-
955
- end
956
-
957
- class Get_args
958
- include ::Thrift::Struct
959
- SOURCE_ID = 1
960
- GRAPH_ID = 2
961
- DESTINATION_ID = 3
962
-
963
- ::Thrift::Struct.field_accessor self, :source_id, :graph_id, :destination_id
964
- FIELDS = {
965
- SOURCE_ID => {:type => ::Thrift::Types::I64, :name => 'source_id'},
966
- GRAPH_ID => {:type => ::Thrift::Types::I32, :name => 'graph_id'},
967
- DESTINATION_ID => {:type => ::Thrift::Types::I64, :name => 'destination_id'}
968
- }
969
-
970
- def struct_fields; FIELDS; end
971
-
972
- def validate
973
- end
974
-
975
- end
976
-
977
- class Get_result
978
- include ::Thrift::Struct
979
- SUCCESS = 0
980
- EX = -1
981
-
982
- ::Thrift::Struct.field_accessor self, :success, :ex
983
- FIELDS = {
984
- SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => Edges::Edge},
985
- EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => Flock::FlockException}
986
- }
987
-
988
- def struct_fields; FIELDS; end
989
-
990
- def validate
991
- end
992
-
993
- end
994
-
995
- class Retry_errors_args
996
- include ::Thrift::Struct
997
-
998
- FIELDS = {
999
-
1000
- }
1001
-
1002
- def struct_fields; FIELDS; end
1003
-
1004
- def validate
1005
- end
1006
-
1007
- end
1008
-
1009
- class Retry_errors_result
1010
- include ::Thrift::Struct
1011
- EX = -1
1012
-
1013
- ::Thrift::Struct.field_accessor self, :ex
1014
- FIELDS = {
1015
- EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => Flock::FlockException}
1016
- }
1017
-
1018
- def struct_fields; FIELDS; end
1019
-
1020
- def validate
1021
- end
1022
-
1023
- end
1024
-
1025
- class Retry_migrate_errors_args
1026
- include ::Thrift::Struct
1027
-
1028
- FIELDS = {
1029
-
1030
- }
1031
-
1032
- def struct_fields; FIELDS; end
1033
-
1034
- def validate
1035
- end
1036
-
1037
- end
1038
-
1039
- class Retry_migrate_errors_result
1040
- include ::Thrift::Struct
1041
- EX = -1
1042
-
1043
- ::Thrift::Struct.field_accessor self, :ex
1044
- FIELDS = {
1045
- EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => Flock::FlockException}
1046
- }
1047
-
1048
- def struct_fields; FIELDS; end
1049
-
1050
- def validate
1051
- end
1052
-
1053
- end
1054
-
1055
- class Stop_writes_args
1056
- include ::Thrift::Struct
1057
-
1058
- FIELDS = {
1059
-
1060
- }
1061
-
1062
- def struct_fields; FIELDS; end
1063
-
1064
- def validate
1065
- end
1066
-
1067
- end
1068
-
1069
- class Stop_writes_result
1070
- include ::Thrift::Struct
1071
- EX = -1
1072
-
1073
- ::Thrift::Struct.field_accessor self, :ex
1074
- FIELDS = {
1075
- EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => Flock::FlockException}
1076
- }
1077
-
1078
- def struct_fields; FIELDS; end
1079
-
1080
- def validate
1081
- end
1082
-
1083
- end
1084
-
1085
- class Resume_writes_args
1086
- include ::Thrift::Struct
1087
-
1088
- FIELDS = {
1089
-
1090
- }
1091
-
1092
- def struct_fields; FIELDS; end
1093
-
1094
- def validate
1095
- end
1096
-
1097
- end
1098
-
1099
- class Resume_writes_result
1100
- include ::Thrift::Struct
1101
- EX = -1
1102
-
1103
- ::Thrift::Struct.field_accessor self, :ex
1104
- FIELDS = {
1105
- EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => Flock::FlockException}
1106
- }
1107
-
1108
- def struct_fields; FIELDS; end
1109
-
1110
- def validate
1111
- end
1112
-
1113
- end
1114
-
1115
- class Stop_writes_for_args
1116
- include ::Thrift::Struct
1117
- PRIORITY = 1
1118
-
1119
- ::Thrift::Struct.field_accessor self, :priority
1120
- FIELDS = {
1121
- PRIORITY => {:type => ::Thrift::Types::I32, :name => 'priority'}
1122
- }
1123
-
1124
- def struct_fields; FIELDS; end
1125
-
1126
- def validate
1127
- end
1128
-
1129
- end
1130
-
1131
- class Stop_writes_for_result
1132
- include ::Thrift::Struct
1133
- EX = -1
1134
-
1135
- ::Thrift::Struct.field_accessor self, :ex
1136
- FIELDS = {
1137
- EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => Flock::FlockException}
1138
- }
1139
-
1140
- def struct_fields; FIELDS; end
1141
-
1142
- def validate
1143
- end
1144
-
1145
- end
1146
-
1147
- class Resume_writes_for_args
1148
- include ::Thrift::Struct
1149
- PRIORITY = 1
1150
-
1151
- ::Thrift::Struct.field_accessor self, :priority
1152
- FIELDS = {
1153
- PRIORITY => {:type => ::Thrift::Types::I32, :name => 'priority'}
1154
- }
1155
-
1156
- def struct_fields; FIELDS; end
1157
-
1158
- def validate
1159
- end
1160
-
1161
- end
1162
-
1163
- class Resume_writes_for_result
1164
- include ::Thrift::Struct
1165
- EX = -1
1166
-
1167
- ::Thrift::Struct.field_accessor self, :ex
1168
- FIELDS = {
1169
- EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => Flock::FlockException}
1170
- }
1171
-
1172
- def struct_fields; FIELDS; end
1173
-
1174
- def validate
1175
- end
1176
-
1177
- end
1178
-
1179
- class Is_writing_args
1180
- include ::Thrift::Struct
1181
- PRIORITY = 1
1182
-
1183
- ::Thrift::Struct.field_accessor self, :priority
1184
- FIELDS = {
1185
- PRIORITY => {:type => ::Thrift::Types::I32, :name => 'priority'}
1186
- }
1187
-
1188
- def struct_fields; FIELDS; end
1189
-
1190
- def validate
1191
- end
1192
-
1193
- end
1194
-
1195
- class Is_writing_result
1196
- include ::Thrift::Struct
1197
- SUCCESS = 0
1198
- EX = -1
1199
-
1200
- ::Thrift::Struct.field_accessor self, :success, :ex
1201
- FIELDS = {
1202
- SUCCESS => {:type => ::Thrift::Types::BOOL, :name => 'success'},
1203
- EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => Flock::FlockException}
1204
- }
1205
-
1206
- def struct_fields; FIELDS; end
1207
-
1208
- def validate
1209
- end
1210
-
1211
- end
1212
-
1213
- class Inject_job_args
1214
- include ::Thrift::Struct
1215
- PRIORITY = 1
1216
- JOB = 2
1217
-
1218
- ::Thrift::Struct.field_accessor self, :priority, :job
1219
- FIELDS = {
1220
- PRIORITY => {:type => ::Thrift::Types::I32, :name => 'priority'},
1221
- JOB => {:type => ::Thrift::Types::STRING, :name => 'job'}
1222
- }
1223
-
1224
- def struct_fields; FIELDS; end
1225
-
1226
- def validate
1227
- end
1228
-
1229
- end
1230
-
1231
- class Inject_job_result
1232
- include ::Thrift::Struct
1233
- EX = -1
1234
-
1235
- ::Thrift::Struct.field_accessor self, :ex
1236
- FIELDS = {
1237
- EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => Flock::FlockException}
1238
- }
1239
-
1240
- def struct_fields; FIELDS; end
1241
-
1242
- def validate
1243
- end
1244
-
1245
- end
1246
-
1247
- class Select_args
1248
- include ::Thrift::Struct
1249
- OPERATIONS = 1
1250
- PAGE = 2
1251
-
1252
- ::Thrift::Struct.field_accessor self, :operations, :page
1253
- FIELDS = {
1254
- OPERATIONS => {:type => ::Thrift::Types::LIST, :name => 'operations', :element => {:type => ::Thrift::Types::STRUCT, :class => Edges::SelectOperation}},
1255
- PAGE => {:type => ::Thrift::Types::STRUCT, :name => 'page', :class => Flock::Page}
1256
- }
1257
-
1258
- def struct_fields; FIELDS; end
1259
-
1260
- def validate
1261
- end
1262
-
1263
- end
1264
-
1265
- class Select_result
1266
- include ::Thrift::Struct
1267
- SUCCESS = 0
1268
-
1269
- ::Thrift::Struct.field_accessor self, :success
1270
- FIELDS = {
1271
- SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => Flock::Results}
1272
- }
1273
-
1274
- def struct_fields; FIELDS; end
1275
-
1276
- def validate
1277
- end
1278
-
1279
- end
1280
-
1281
- class Select2_args
1282
- include ::Thrift::Struct
1283
- QUERIES = 1
1284
-
1285
- ::Thrift::Struct.field_accessor self, :queries
1286
- FIELDS = {
1287
- QUERIES => {:type => ::Thrift::Types::LIST, :name => 'queries', :element => {:type => ::Thrift::Types::STRUCT, :class => Edges::SelectQuery}}
1288
- }
1289
-
1290
- def struct_fields; FIELDS; end
1291
-
1292
- def validate
1293
- end
1294
-
1295
- end
1296
-
1297
- class Select2_result
1298
- include ::Thrift::Struct
1299
- SUCCESS = 0
1300
- EX = -1
1301
-
1302
- ::Thrift::Struct.field_accessor self, :success, :ex
1303
- FIELDS = {
1304
- SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => Flock::Results}},
1305
- EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => Flock::FlockException}
1306
- }
1307
-
1308
- def struct_fields; FIELDS; end
1309
-
1310
- def validate
1311
- end
1312
-
1313
- end
1314
-
1315
- class Select_edges_args
1316
- include ::Thrift::Struct
1317
- QUERIES = 1
1318
-
1319
- ::Thrift::Struct.field_accessor self, :queries
1320
- FIELDS = {
1321
- QUERIES => {:type => ::Thrift::Types::LIST, :name => 'queries', :element => {:type => ::Thrift::Types::STRUCT, :class => Edges::EdgeQuery}}
1322
- }
1323
-
1324
- def struct_fields; FIELDS; end
1325
-
1326
- def validate
1327
- end
1328
-
1329
- end
1330
-
1331
- class Select_edges_result
1332
- include ::Thrift::Struct
1333
- SUCCESS = 0
1334
- EX = -1
1335
-
1336
- ::Thrift::Struct.field_accessor self, :success, :ex
1337
- FIELDS = {
1338
- SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => Edges::EdgeResults}},
1339
- EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => Flock::FlockException}
1340
- }
1341
-
1342
- def struct_fields; FIELDS; end
1343
-
1344
- def validate
1345
- end
1346
-
1347
- end
1348
-
1349
- class Execute_args
1350
- include ::Thrift::Struct
1351
- OPERATIONS = 1
1352
-
1353
- ::Thrift::Struct.field_accessor self, :operations
1354
- FIELDS = {
1355
- OPERATIONS => {:type => ::Thrift::Types::STRUCT, :name => 'operations', :class => Edges::ExecuteOperations}
1356
- }
1357
-
1358
- def struct_fields; FIELDS; end
1359
-
1360
- def validate
1361
- end
1362
-
1363
- end
1364
-
1365
- class Execute_result
1366
- include ::Thrift::Struct
1367
-
1368
- FIELDS = {
1369
-
1370
- }
1371
-
1372
- def struct_fields; FIELDS; end
1373
-
1374
- def validate
1375
- end
1376
-
1377
- end
1378
-
1379
- class Count_args
1380
- include ::Thrift::Struct
1381
- OPERATIONS = 1
1382
-
1383
- ::Thrift::Struct.field_accessor self, :operations
1384
- FIELDS = {
1385
- OPERATIONS => {:type => ::Thrift::Types::LIST, :name => 'operations', :element => {:type => ::Thrift::Types::STRUCT, :class => Edges::SelectOperation}}
1386
- }
1387
-
1388
- def struct_fields; FIELDS; end
1389
-
1390
- def validate
1391
- end
1392
-
1393
- end
1394
-
1395
- class Count_result
1396
- include ::Thrift::Struct
1397
- SUCCESS = 0
1398
-
1399
- ::Thrift::Struct.field_accessor self, :success
1400
- FIELDS = {
1401
- SUCCESS => {:type => ::Thrift::Types::I32, :name => 'success'}
1402
- }
1403
-
1404
- def struct_fields; FIELDS; end
1405
-
1406
- def validate
1407
- end
1408
-
1409
- end
1410
-
1411
- class Count2_args
1412
- include ::Thrift::Struct
1413
- QUERIES = 1
1414
-
1415
- ::Thrift::Struct.field_accessor self, :queries
1416
- FIELDS = {
1417
- QUERIES => {:type => ::Thrift::Types::LIST, :name => 'queries', :element => {:type => ::Thrift::Types::LIST, :element => {:type => ::Thrift::Types::STRUCT, :class => Edges::SelectOperation}}}
1418
- }
1419
-
1420
- def struct_fields; FIELDS; end
1421
-
1422
- def validate
1423
- end
1424
-
1425
- end
1426
-
1427
- class Count2_result
1428
- include ::Thrift::Struct
1429
- SUCCESS = 0
1430
-
1431
- ::Thrift::Struct.field_accessor self, :success
1432
- FIELDS = {
1433
- SUCCESS => {:type => ::Thrift::Types::STRING, :name => 'success'}
1434
- }
1435
-
1436
- def struct_fields; FIELDS; end
1437
-
1438
- def validate
1439
- end
1440
-
1441
- end
1442
-
1443
- end
1444
-
1445
- end