flockdb 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,210 @@
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
+ module SelectOperationType
10
+ SimpleQuery = 1
11
+ Intersection = 2
12
+ Union = 3
13
+ Difference = 4
14
+ VALUE_MAP = {1 => "SimpleQuery", 2 => "Intersection", 3 => "Union", 4 => "Difference"}
15
+ VALID_VALUES = Set.new([SimpleQuery, Intersection, Union, Difference]).freeze
16
+ end
17
+
18
+ module ExecuteOperationType
19
+ Add = 1
20
+ Remove = 2
21
+ Archive = 3
22
+ Negate = 4
23
+ VALUE_MAP = {1 => "Add", 2 => "Remove", 3 => "Archive", 4 => "Negate"}
24
+ VALID_VALUES = Set.new([Add, Remove, Archive, Negate]).freeze
25
+ end
26
+
27
+ module EdgeState
28
+ Positive = 0
29
+ Negative = 3
30
+ Removed = 1
31
+ Archived = 2
32
+ VALUE_MAP = {0 => "Positive", 3 => "Negative", 1 => "Removed", 2 => "Archived"}
33
+ VALID_VALUES = Set.new([Positive, Negative, Removed, Archived]).freeze
34
+ end
35
+
36
+ class Edge
37
+ include ::Thrift::Struct
38
+ SOURCE_ID = 1
39
+ DESTINATION_ID = 2
40
+ POSITION = 3
41
+ UPDATED_AT = 4
42
+ COUNT = 5
43
+ STATE_ID = 6
44
+
45
+ ::Thrift::Struct.field_accessor self, :source_id, :destination_id, :position, :updated_at, :count, :state_id
46
+ FIELDS = {
47
+ SOURCE_ID => {:type => ::Thrift::Types::I64, :name => 'source_id'},
48
+ DESTINATION_ID => {:type => ::Thrift::Types::I64, :name => 'destination_id'},
49
+ POSITION => {:type => ::Thrift::Types::I64, :name => 'position'},
50
+ UPDATED_AT => {:type => ::Thrift::Types::I32, :name => 'updated_at'},
51
+ COUNT => {:type => ::Thrift::Types::I32, :name => 'count'},
52
+ STATE_ID => {:type => ::Thrift::Types::I32, :name => 'state_id'}
53
+ }
54
+
55
+ def struct_fields; FIELDS; end
56
+
57
+ def validate
58
+ end
59
+
60
+ end
61
+
62
+ class QueryTerm
63
+ include ::Thrift::Struct
64
+ SOURCE_ID = 1
65
+ GRAPH_ID = 2
66
+ IS_FORWARD = 3
67
+ DESTINATION_IDS = 4
68
+ STATE_IDS = 5
69
+
70
+ ::Thrift::Struct.field_accessor self, :source_id, :graph_id, :is_forward, :destination_ids, :state_ids
71
+ FIELDS = {
72
+ SOURCE_ID => {:type => ::Thrift::Types::I64, :name => 'source_id'},
73
+ GRAPH_ID => {:type => ::Thrift::Types::I32, :name => 'graph_id'},
74
+ IS_FORWARD => {:type => ::Thrift::Types::BOOL, :name => 'is_forward'},
75
+ DESTINATION_IDS => {:type => ::Thrift::Types::STRING, :name => 'destination_ids', :optional => true},
76
+ STATE_IDS => {:type => ::Thrift::Types::LIST, :name => 'state_ids', :element => {:type => ::Thrift::Types::I32}, :optional => true}
77
+ }
78
+
79
+ def struct_fields; FIELDS; end
80
+
81
+ def validate
82
+ end
83
+
84
+ end
85
+
86
+ class SelectOperation
87
+ include ::Thrift::Struct
88
+ OPERATION_TYPE = 1
89
+ TERM = 2
90
+
91
+ ::Thrift::Struct.field_accessor self, :operation_type, :term
92
+ FIELDS = {
93
+ OPERATION_TYPE => {:type => ::Thrift::Types::I32, :name => 'operation_type', :enum_class => Edges::SelectOperationType},
94
+ TERM => {:type => ::Thrift::Types::STRUCT, :name => 'term', :class => Edges::QueryTerm, :optional => true}
95
+ }
96
+
97
+ def struct_fields; FIELDS; end
98
+
99
+ def validate
100
+ unless @operation_type.nil? || Edges::SelectOperationType::VALID_VALUES.include?(@operation_type)
101
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field operation_type!')
102
+ end
103
+ end
104
+
105
+ end
106
+
107
+ class ExecuteOperation
108
+ include ::Thrift::Struct
109
+ OPERATION_TYPE = 1
110
+ TERM = 2
111
+ POSITION = 3
112
+
113
+ ::Thrift::Struct.field_accessor self, :operation_type, :term, :position
114
+ FIELDS = {
115
+ OPERATION_TYPE => {:type => ::Thrift::Types::I32, :name => 'operation_type', :enum_class => Edges::ExecuteOperationType},
116
+ TERM => {:type => ::Thrift::Types::STRUCT, :name => 'term', :class => Edges::QueryTerm},
117
+ POSITION => {:type => ::Thrift::Types::I64, :name => 'position', :optional => true}
118
+ }
119
+
120
+ def struct_fields; FIELDS; end
121
+
122
+ def validate
123
+ unless @operation_type.nil? || Edges::ExecuteOperationType::VALID_VALUES.include?(@operation_type)
124
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field operation_type!')
125
+ end
126
+ end
127
+
128
+ end
129
+
130
+ class ExecuteOperations
131
+ include ::Thrift::Struct
132
+ OPERATIONS = 1
133
+ EXECUTE_AT = 2
134
+ PRIORITY = 3
135
+
136
+ ::Thrift::Struct.field_accessor self, :operations, :execute_at, :priority
137
+ FIELDS = {
138
+ OPERATIONS => {:type => ::Thrift::Types::LIST, :name => 'operations', :element => {:type => ::Thrift::Types::STRUCT, :class => Edges::ExecuteOperation}},
139
+ EXECUTE_AT => {:type => ::Thrift::Types::I32, :name => 'execute_at', :optional => true},
140
+ PRIORITY => {:type => ::Thrift::Types::I32, :name => 'priority', :enum_class => Flock::Priority}
141
+ }
142
+
143
+ def struct_fields; FIELDS; end
144
+
145
+ def validate
146
+ unless @priority.nil? || Flock::Priority::VALID_VALUES.include?(@priority)
147
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field priority!')
148
+ end
149
+ end
150
+
151
+ end
152
+
153
+ class SelectQuery
154
+ include ::Thrift::Struct
155
+ OPERATIONS = 1
156
+ PAGE = 2
157
+
158
+ ::Thrift::Struct.field_accessor self, :operations, :page
159
+ FIELDS = {
160
+ OPERATIONS => {:type => ::Thrift::Types::LIST, :name => 'operations', :element => {:type => ::Thrift::Types::STRUCT, :class => Edges::SelectOperation}},
161
+ PAGE => {:type => ::Thrift::Types::STRUCT, :name => 'page', :class => Flock::Page}
162
+ }
163
+
164
+ def struct_fields; FIELDS; end
165
+
166
+ def validate
167
+ end
168
+
169
+ end
170
+
171
+ class EdgeQuery
172
+ include ::Thrift::Struct
173
+ TERM = 1
174
+ PAGE = 2
175
+
176
+ ::Thrift::Struct.field_accessor self, :term, :page
177
+ FIELDS = {
178
+ TERM => {:type => ::Thrift::Types::STRUCT, :name => 'term', :class => Edges::QueryTerm},
179
+ PAGE => {:type => ::Thrift::Types::STRUCT, :name => 'page', :class => Flock::Page}
180
+ }
181
+
182
+ def struct_fields; FIELDS; end
183
+
184
+ def validate
185
+ end
186
+
187
+ end
188
+
189
+ class EdgeResults
190
+ include ::Thrift::Struct
191
+ EDGES = 1
192
+ NEXT_CURSOR = 2
193
+ PREV_CURSOR = 3
194
+
195
+ ::Thrift::Struct.field_accessor self, :edges, :next_cursor, :prev_cursor
196
+ FIELDS = {
197
+ EDGES => {:type => ::Thrift::Types::LIST, :name => 'edges', :element => {:type => ::Thrift::Types::STRUCT, :class => Edges::Edge}},
198
+ NEXT_CURSOR => {:type => ::Thrift::Types::I64, :name => 'next_cursor'},
199
+ PREV_CURSOR => {:type => ::Thrift::Types::I64, :name => 'prev_cursor'}
200
+ }
201
+
202
+ def struct_fields; FIELDS; end
203
+
204
+ def validate
205
+ end
206
+
207
+ end
208
+
209
+ end
210
+ end
@@ -0,0 +1,12 @@
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
+ CursorStart = -1
9
+
10
+ CursorEnd = 0
11
+
12
+ end
@@ -0,0 +1,168 @@
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 Priority
10
+ Low = 1
11
+ Medium = 2
12
+ High = 3
13
+ VALUE_MAP = {1 => "Low", 2 => "Medium", 3 => "High"}
14
+ VALID_VALUES = Set.new([Low, Medium, High]).freeze
15
+ end
16
+
17
+ class FlockException < ::Thrift::Exception
18
+ include ::Thrift::Struct
19
+ def initialize(message=nil)
20
+ super()
21
+ self.description = message
22
+ end
23
+
24
+ def message; description end
25
+
26
+ DESCRIPTION = 1
27
+
28
+ ::Thrift::Struct.field_accessor self, :description
29
+ FIELDS = {
30
+ DESCRIPTION => {:type => ::Thrift::Types::STRING, :name => 'description'}
31
+ }
32
+
33
+ def struct_fields; FIELDS; end
34
+
35
+ def validate
36
+ end
37
+
38
+ end
39
+
40
+ class Results
41
+ include ::Thrift::Struct
42
+ IDS = 1
43
+ NEXT_CURSOR = 2
44
+ PREV_CURSOR = 3
45
+
46
+ ::Thrift::Struct.field_accessor self, :ids, :next_cursor, :prev_cursor
47
+ FIELDS = {
48
+ IDS => {:type => ::Thrift::Types::STRING, :name => 'ids'},
49
+ NEXT_CURSOR => {:type => ::Thrift::Types::I64, :name => 'next_cursor'},
50
+ PREV_CURSOR => {:type => ::Thrift::Types::I64, :name => 'prev_cursor'}
51
+ }
52
+
53
+ def struct_fields; FIELDS; end
54
+
55
+ def validate
56
+ end
57
+
58
+ end
59
+
60
+ class Page
61
+ include ::Thrift::Struct
62
+ COUNT = 1
63
+ CURSOR = 2
64
+
65
+ ::Thrift::Struct.field_accessor self, :count, :cursor
66
+ FIELDS = {
67
+ COUNT => {:type => ::Thrift::Types::I32, :name => 'count'},
68
+ CURSOR => {:type => ::Thrift::Types::I64, :name => 'cursor'}
69
+ }
70
+
71
+ def struct_fields; FIELDS; end
72
+
73
+ def validate
74
+ end
75
+
76
+ end
77
+
78
+ class ShardInfo
79
+ include ::Thrift::Struct
80
+ CLASS_NAME = 1
81
+ TABLE_PREFIX = 2
82
+ HOSTNAME = 3
83
+ SOURCE_TYPE = 4
84
+ DESTINATION_TYPE = 5
85
+ BUSY = 6
86
+ SHARD_ID = 7
87
+
88
+ ::Thrift::Struct.field_accessor self, :class_name, :table_prefix, :hostname, :source_type, :destination_type, :busy, :shard_id
89
+ FIELDS = {
90
+ CLASS_NAME => {:type => ::Thrift::Types::STRING, :name => 'class_name'},
91
+ TABLE_PREFIX => {:type => ::Thrift::Types::STRING, :name => 'table_prefix'},
92
+ HOSTNAME => {:type => ::Thrift::Types::STRING, :name => 'hostname'},
93
+ SOURCE_TYPE => {:type => ::Thrift::Types::STRING, :name => 'source_type'},
94
+ DESTINATION_TYPE => {:type => ::Thrift::Types::STRING, :name => 'destination_type'},
95
+ BUSY => {:type => ::Thrift::Types::I32, :name => 'busy'},
96
+ SHARD_ID => {:type => ::Thrift::Types::I32, :name => 'shard_id'}
97
+ }
98
+
99
+ def struct_fields; FIELDS; end
100
+
101
+ def validate
102
+ end
103
+
104
+ end
105
+
106
+ class ShardMigration
107
+ include ::Thrift::Struct
108
+ SOURCE_SHARD_ID = 1
109
+ DESTINATION_SHARD_ID = 2
110
+ REPLICATING_SHARD_ID = 3
111
+ WRITE_ONLY_SHARD_ID = 4
112
+
113
+ ::Thrift::Struct.field_accessor self, :source_shard_id, :destination_shard_id, :replicating_shard_id, :write_only_shard_id
114
+ FIELDS = {
115
+ SOURCE_SHARD_ID => {:type => ::Thrift::Types::I32, :name => 'source_shard_id'},
116
+ DESTINATION_SHARD_ID => {:type => ::Thrift::Types::I32, :name => 'destination_shard_id'},
117
+ REPLICATING_SHARD_ID => {:type => ::Thrift::Types::I32, :name => 'replicating_shard_id'},
118
+ WRITE_ONLY_SHARD_ID => {:type => ::Thrift::Types::I32, :name => 'write_only_shard_id'}
119
+ }
120
+
121
+ def struct_fields; FIELDS; end
122
+
123
+ def validate
124
+ end
125
+
126
+ end
127
+
128
+ class ShardChild
129
+ include ::Thrift::Struct
130
+ SHARD_ID = 1
131
+ POSITION = 2
132
+ WEIGHT = 3
133
+
134
+ ::Thrift::Struct.field_accessor self, :shard_id, :position, :weight
135
+ FIELDS = {
136
+ SHARD_ID => {:type => ::Thrift::Types::I32, :name => 'shard_id'},
137
+ POSITION => {:type => ::Thrift::Types::I32, :name => 'position'},
138
+ WEIGHT => {:type => ::Thrift::Types::I32, :name => 'weight'}
139
+ }
140
+
141
+ def struct_fields; FIELDS; end
142
+
143
+ def validate
144
+ end
145
+
146
+ end
147
+
148
+ class Forwarding
149
+ include ::Thrift::Struct
150
+ TABLE_ID = 1
151
+ BASE_ID = 2
152
+ SHARD_ID = 3
153
+
154
+ ::Thrift::Struct.field_accessor self, :table_id, :base_id, :shard_id
155
+ FIELDS = {
156
+ TABLE_ID => {:type => ::Thrift::Types::LIST, :name => 'table_id', :element => {:type => ::Thrift::Types::I32}},
157
+ BASE_ID => {:type => ::Thrift::Types::I64, :name => 'base_id'},
158
+ SHARD_ID => {:type => ::Thrift::Types::I32, :name => 'shard_id'}
159
+ }
160
+
161
+ def struct_fields; FIELDS; end
162
+
163
+ def validate
164
+ end
165
+
166
+ end
167
+
168
+ end
@@ -0,0 +1,1598 @@
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 Shards
9
+ class Client
10
+ include ::Thrift::Client
11
+
12
+ def create_shard(shard)
13
+ send_create_shard(shard)
14
+ return recv_create_shard()
15
+ end
16
+
17
+ def send_create_shard(shard)
18
+ send_message('create_shard', Create_shard_args, :shard => shard)
19
+ end
20
+
21
+ def recv_create_shard()
22
+ result = receive_message(Create_shard_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, 'create_shard failed: unknown result')
26
+ end
27
+
28
+ def find_shard(shard)
29
+ send_find_shard(shard)
30
+ return recv_find_shard()
31
+ end
32
+
33
+ def send_find_shard(shard)
34
+ send_message('find_shard', Find_shard_args, :shard => shard)
35
+ end
36
+
37
+ def recv_find_shard()
38
+ result = receive_message(Find_shard_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, 'find_shard failed: unknown result')
42
+ end
43
+
44
+ def get_shard(shard_id)
45
+ send_get_shard(shard_id)
46
+ return recv_get_shard()
47
+ end
48
+
49
+ def send_get_shard(shard_id)
50
+ send_message('get_shard', Get_shard_args, :shard_id => shard_id)
51
+ end
52
+
53
+ def recv_get_shard()
54
+ result = receive_message(Get_shard_result)
55
+ return result.success unless result.success.nil?
56
+ raise result.ex unless result.ex.nil?
57
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_shard failed: unknown result')
58
+ end
59
+
60
+ def update_shard(shard)
61
+ send_update_shard(shard)
62
+ recv_update_shard()
63
+ end
64
+
65
+ def send_update_shard(shard)
66
+ send_message('update_shard', Update_shard_args, :shard => shard)
67
+ end
68
+
69
+ def recv_update_shard()
70
+ result = receive_message(Update_shard_result)
71
+ raise result.ex unless result.ex.nil?
72
+ return
73
+ end
74
+
75
+ def delete_shard(shard_id)
76
+ send_delete_shard(shard_id)
77
+ recv_delete_shard()
78
+ end
79
+
80
+ def send_delete_shard(shard_id)
81
+ send_message('delete_shard', Delete_shard_args, :shard_id => shard_id)
82
+ end
83
+
84
+ def recv_delete_shard()
85
+ result = receive_message(Delete_shard_result)
86
+ raise result.ex unless result.ex.nil?
87
+ return
88
+ end
89
+
90
+ def add_child_shard(parent_shard_id, child_shard_id, position, weight)
91
+ send_add_child_shard(parent_shard_id, child_shard_id, position, weight)
92
+ recv_add_child_shard()
93
+ end
94
+
95
+ def send_add_child_shard(parent_shard_id, child_shard_id, position, weight)
96
+ send_message('add_child_shard', Add_child_shard_args, :parent_shard_id => parent_shard_id, :child_shard_id => child_shard_id, :position => position, :weight => weight)
97
+ end
98
+
99
+ def recv_add_child_shard()
100
+ result = receive_message(Add_child_shard_result)
101
+ raise result.ex unless result.ex.nil?
102
+ return
103
+ end
104
+
105
+ def remove_child_shard(parent_shard_id, child_shard_id)
106
+ send_remove_child_shard(parent_shard_id, child_shard_id)
107
+ recv_remove_child_shard()
108
+ end
109
+
110
+ def send_remove_child_shard(parent_shard_id, child_shard_id)
111
+ send_message('remove_child_shard', Remove_child_shard_args, :parent_shard_id => parent_shard_id, :child_shard_id => child_shard_id)
112
+ end
113
+
114
+ def recv_remove_child_shard()
115
+ result = receive_message(Remove_child_shard_result)
116
+ raise result.ex unless result.ex.nil?
117
+ return
118
+ end
119
+
120
+ def replace_child_shard(old_child_shard_id, new_child_shard_id)
121
+ send_replace_child_shard(old_child_shard_id, new_child_shard_id)
122
+ recv_replace_child_shard()
123
+ end
124
+
125
+ def send_replace_child_shard(old_child_shard_id, new_child_shard_id)
126
+ send_message('replace_child_shard', Replace_child_shard_args, :old_child_shard_id => old_child_shard_id, :new_child_shard_id => new_child_shard_id)
127
+ end
128
+
129
+ def recv_replace_child_shard()
130
+ result = receive_message(Replace_child_shard_result)
131
+ raise result.ex unless result.ex.nil?
132
+ return
133
+ end
134
+
135
+ def list_shard_children(shard_id)
136
+ send_list_shard_children(shard_id)
137
+ return recv_list_shard_children()
138
+ end
139
+
140
+ def send_list_shard_children(shard_id)
141
+ send_message('list_shard_children', List_shard_children_args, :shard_id => shard_id)
142
+ end
143
+
144
+ def recv_list_shard_children()
145
+ result = receive_message(List_shard_children_result)
146
+ return result.success unless result.success.nil?
147
+ raise result.ex unless result.ex.nil?
148
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'list_shard_children failed: unknown result')
149
+ end
150
+
151
+ def mark_shard_busy(shard_id, busy)
152
+ send_mark_shard_busy(shard_id, busy)
153
+ recv_mark_shard_busy()
154
+ end
155
+
156
+ def send_mark_shard_busy(shard_id, busy)
157
+ send_message('mark_shard_busy', Mark_shard_busy_args, :shard_id => shard_id, :busy => busy)
158
+ end
159
+
160
+ def recv_mark_shard_busy()
161
+ result = receive_message(Mark_shard_busy_result)
162
+ raise result.ex unless result.ex.nil?
163
+ return
164
+ end
165
+
166
+ def copy_shard(source_shard_id, destination_shard_id)
167
+ send_copy_shard(source_shard_id, destination_shard_id)
168
+ recv_copy_shard()
169
+ end
170
+
171
+ def send_copy_shard(source_shard_id, destination_shard_id)
172
+ send_message('copy_shard', Copy_shard_args, :source_shard_id => source_shard_id, :destination_shard_id => destination_shard_id)
173
+ end
174
+
175
+ def recv_copy_shard()
176
+ result = receive_message(Copy_shard_result)
177
+ raise result.ex unless result.ex.nil?
178
+ return
179
+ end
180
+
181
+ def setup_migration(source_shard_info, destination_shard_info)
182
+ send_setup_migration(source_shard_info, destination_shard_info)
183
+ return recv_setup_migration()
184
+ end
185
+
186
+ def send_setup_migration(source_shard_info, destination_shard_info)
187
+ send_message('setup_migration', Setup_migration_args, :source_shard_info => source_shard_info, :destination_shard_info => destination_shard_info)
188
+ end
189
+
190
+ def recv_setup_migration()
191
+ result = receive_message(Setup_migration_result)
192
+ return result.success unless result.success.nil?
193
+ raise result.ex unless result.ex.nil?
194
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'setup_migration failed: unknown result')
195
+ end
196
+
197
+ def migrate_shard(migration)
198
+ send_migrate_shard(migration)
199
+ recv_migrate_shard()
200
+ end
201
+
202
+ def send_migrate_shard(migration)
203
+ send_message('migrate_shard', Migrate_shard_args, :migration => migration)
204
+ end
205
+
206
+ def recv_migrate_shard()
207
+ result = receive_message(Migrate_shard_result)
208
+ raise result.ex unless result.ex.nil?
209
+ return
210
+ end
211
+
212
+ def set_forwarding(forwarding)
213
+ send_set_forwarding(forwarding)
214
+ recv_set_forwarding()
215
+ end
216
+
217
+ def send_set_forwarding(forwarding)
218
+ send_message('set_forwarding', Set_forwarding_args, :forwarding => forwarding)
219
+ end
220
+
221
+ def recv_set_forwarding()
222
+ result = receive_message(Set_forwarding_result)
223
+ raise result.ex unless result.ex.nil?
224
+ return
225
+ end
226
+
227
+ def replace_forwarding(old_shard_id, new_shard_id)
228
+ send_replace_forwarding(old_shard_id, new_shard_id)
229
+ recv_replace_forwarding()
230
+ end
231
+
232
+ def send_replace_forwarding(old_shard_id, new_shard_id)
233
+ send_message('replace_forwarding', Replace_forwarding_args, :old_shard_id => old_shard_id, :new_shard_id => new_shard_id)
234
+ end
235
+
236
+ def recv_replace_forwarding()
237
+ result = receive_message(Replace_forwarding_result)
238
+ raise result.ex unless result.ex.nil?
239
+ return
240
+ end
241
+
242
+ def get_forwarding(table_id, base_id)
243
+ send_get_forwarding(table_id, base_id)
244
+ return recv_get_forwarding()
245
+ end
246
+
247
+ def send_get_forwarding(table_id, base_id)
248
+ send_message('get_forwarding', Get_forwarding_args, :table_id => table_id, :base_id => base_id)
249
+ end
250
+
251
+ def recv_get_forwarding()
252
+ result = receive_message(Get_forwarding_result)
253
+ return result.success unless result.success.nil?
254
+ raise result.ex unless result.ex.nil?
255
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_forwarding failed: unknown result')
256
+ end
257
+
258
+ def get_forwarding_for_shard(shard_id)
259
+ send_get_forwarding_for_shard(shard_id)
260
+ return recv_get_forwarding_for_shard()
261
+ end
262
+
263
+ def send_get_forwarding_for_shard(shard_id)
264
+ send_message('get_forwarding_for_shard', Get_forwarding_for_shard_args, :shard_id => shard_id)
265
+ end
266
+
267
+ def recv_get_forwarding_for_shard()
268
+ result = receive_message(Get_forwarding_for_shard_result)
269
+ return result.success unless result.success.nil?
270
+ raise result.ex unless result.ex.nil?
271
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_forwarding_for_shard failed: unknown result')
272
+ end
273
+
274
+ def get_forwardings()
275
+ send_get_forwardings()
276
+ return recv_get_forwardings()
277
+ end
278
+
279
+ def send_get_forwardings()
280
+ send_message('get_forwardings', Get_forwardings_args)
281
+ end
282
+
283
+ def recv_get_forwardings()
284
+ result = receive_message(Get_forwardings_result)
285
+ return result.success unless result.success.nil?
286
+ raise result.ex unless result.ex.nil?
287
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_forwardings failed: unknown result')
288
+ end
289
+
290
+ def reload_forwardings()
291
+ send_reload_forwardings()
292
+ recv_reload_forwardings()
293
+ end
294
+
295
+ def send_reload_forwardings()
296
+ send_message('reload_forwardings', Reload_forwardings_args)
297
+ end
298
+
299
+ def recv_reload_forwardings()
300
+ result = receive_message(Reload_forwardings_result)
301
+ raise result.ex unless result.ex.nil?
302
+ return
303
+ end
304
+
305
+ def find_current_forwarding(table_id, id)
306
+ send_find_current_forwarding(table_id, id)
307
+ return recv_find_current_forwarding()
308
+ end
309
+
310
+ def send_find_current_forwarding(table_id, id)
311
+ send_message('find_current_forwarding', Find_current_forwarding_args, :table_id => table_id, :id => id)
312
+ end
313
+
314
+ def recv_find_current_forwarding()
315
+ result = receive_message(Find_current_forwarding_result)
316
+ return result.success unless result.success.nil?
317
+ raise result.ex unless result.ex.nil?
318
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'find_current_forwarding failed: unknown result')
319
+ end
320
+
321
+ def shard_ids_for_hostname(hostname, class_name)
322
+ send_shard_ids_for_hostname(hostname, class_name)
323
+ return recv_shard_ids_for_hostname()
324
+ end
325
+
326
+ def send_shard_ids_for_hostname(hostname, class_name)
327
+ send_message('shard_ids_for_hostname', Shard_ids_for_hostname_args, :hostname => hostname, :class_name => class_name)
328
+ end
329
+
330
+ def recv_shard_ids_for_hostname()
331
+ result = receive_message(Shard_ids_for_hostname_result)
332
+ return result.success unless result.success.nil?
333
+ raise result.ex unless result.ex.nil?
334
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'shard_ids_for_hostname failed: unknown result')
335
+ end
336
+
337
+ def shards_for_hostname(hostname, class_name)
338
+ send_shards_for_hostname(hostname, class_name)
339
+ return recv_shards_for_hostname()
340
+ end
341
+
342
+ def send_shards_for_hostname(hostname, class_name)
343
+ send_message('shards_for_hostname', Shards_for_hostname_args, :hostname => hostname, :class_name => class_name)
344
+ end
345
+
346
+ def recv_shards_for_hostname()
347
+ result = receive_message(Shards_for_hostname_result)
348
+ return result.success unless result.success.nil?
349
+ raise result.ex unless result.ex.nil?
350
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'shards_for_hostname failed: unknown result')
351
+ end
352
+
353
+ def get_busy_shards()
354
+ send_get_busy_shards()
355
+ return recv_get_busy_shards()
356
+ end
357
+
358
+ def send_get_busy_shards()
359
+ send_message('get_busy_shards', Get_busy_shards_args)
360
+ end
361
+
362
+ def recv_get_busy_shards()
363
+ result = receive_message(Get_busy_shards_result)
364
+ return result.success unless result.success.nil?
365
+ raise result.ex unless result.ex.nil?
366
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_busy_shards failed: unknown result')
367
+ end
368
+
369
+ def get_parent_shard(shard_id)
370
+ send_get_parent_shard(shard_id)
371
+ return recv_get_parent_shard()
372
+ end
373
+
374
+ def send_get_parent_shard(shard_id)
375
+ send_message('get_parent_shard', Get_parent_shard_args, :shard_id => shard_id)
376
+ end
377
+
378
+ def recv_get_parent_shard()
379
+ result = receive_message(Get_parent_shard_result)
380
+ return result.success unless result.success.nil?
381
+ raise result.ex unless result.ex.nil?
382
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_parent_shard failed: unknown result')
383
+ end
384
+
385
+ def get_root_shard(shard_id)
386
+ send_get_root_shard(shard_id)
387
+ return recv_get_root_shard()
388
+ end
389
+
390
+ def send_get_root_shard(shard_id)
391
+ send_message('get_root_shard', Get_root_shard_args, :shard_id => shard_id)
392
+ end
393
+
394
+ def recv_get_root_shard()
395
+ result = receive_message(Get_root_shard_result)
396
+ return result.success unless result.success.nil?
397
+ raise result.ex unless result.ex.nil?
398
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_root_shard failed: unknown result')
399
+ end
400
+
401
+ def get_child_shards_of_class(parent_shard_id, class_name)
402
+ send_get_child_shards_of_class(parent_shard_id, class_name)
403
+ return recv_get_child_shards_of_class()
404
+ end
405
+
406
+ def send_get_child_shards_of_class(parent_shard_id, class_name)
407
+ send_message('get_child_shards_of_class', Get_child_shards_of_class_args, :parent_shard_id => parent_shard_id, :class_name => class_name)
408
+ end
409
+
410
+ def recv_get_child_shards_of_class()
411
+ result = receive_message(Get_child_shards_of_class_result)
412
+ return result.success unless result.success.nil?
413
+ raise result.ex unless result.ex.nil?
414
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_child_shards_of_class failed: unknown result')
415
+ end
416
+
417
+ end
418
+
419
+ class Processor
420
+ include ::Thrift::Processor
421
+
422
+ def process_create_shard(seqid, iprot, oprot)
423
+ args = read_args(iprot, Create_shard_args)
424
+ result = Create_shard_result.new()
425
+ begin
426
+ result.success = @handler.create_shard(args.shard)
427
+ rescue Flock::FlockException => ex
428
+ result.ex = ex
429
+ end
430
+ write_result(result, oprot, 'create_shard', seqid)
431
+ end
432
+
433
+ def process_find_shard(seqid, iprot, oprot)
434
+ args = read_args(iprot, Find_shard_args)
435
+ result = Find_shard_result.new()
436
+ begin
437
+ result.success = @handler.find_shard(args.shard)
438
+ rescue Flock::FlockException => ex
439
+ result.ex = ex
440
+ end
441
+ write_result(result, oprot, 'find_shard', seqid)
442
+ end
443
+
444
+ def process_get_shard(seqid, iprot, oprot)
445
+ args = read_args(iprot, Get_shard_args)
446
+ result = Get_shard_result.new()
447
+ begin
448
+ result.success = @handler.get_shard(args.shard_id)
449
+ rescue Flock::FlockException => ex
450
+ result.ex = ex
451
+ end
452
+ write_result(result, oprot, 'get_shard', seqid)
453
+ end
454
+
455
+ def process_update_shard(seqid, iprot, oprot)
456
+ args = read_args(iprot, Update_shard_args)
457
+ result = Update_shard_result.new()
458
+ begin
459
+ @handler.update_shard(args.shard)
460
+ rescue Flock::FlockException => ex
461
+ result.ex = ex
462
+ end
463
+ write_result(result, oprot, 'update_shard', seqid)
464
+ end
465
+
466
+ def process_delete_shard(seqid, iprot, oprot)
467
+ args = read_args(iprot, Delete_shard_args)
468
+ result = Delete_shard_result.new()
469
+ begin
470
+ @handler.delete_shard(args.shard_id)
471
+ rescue Flock::FlockException => ex
472
+ result.ex = ex
473
+ end
474
+ write_result(result, oprot, 'delete_shard', seqid)
475
+ end
476
+
477
+ def process_add_child_shard(seqid, iprot, oprot)
478
+ args = read_args(iprot, Add_child_shard_args)
479
+ result = Add_child_shard_result.new()
480
+ begin
481
+ @handler.add_child_shard(args.parent_shard_id, args.child_shard_id, args.position, args.weight)
482
+ rescue Flock::FlockException => ex
483
+ result.ex = ex
484
+ end
485
+ write_result(result, oprot, 'add_child_shard', seqid)
486
+ end
487
+
488
+ def process_remove_child_shard(seqid, iprot, oprot)
489
+ args = read_args(iprot, Remove_child_shard_args)
490
+ result = Remove_child_shard_result.new()
491
+ begin
492
+ @handler.remove_child_shard(args.parent_shard_id, args.child_shard_id)
493
+ rescue Flock::FlockException => ex
494
+ result.ex = ex
495
+ end
496
+ write_result(result, oprot, 'remove_child_shard', seqid)
497
+ end
498
+
499
+ def process_replace_child_shard(seqid, iprot, oprot)
500
+ args = read_args(iprot, Replace_child_shard_args)
501
+ result = Replace_child_shard_result.new()
502
+ begin
503
+ @handler.replace_child_shard(args.old_child_shard_id, args.new_child_shard_id)
504
+ rescue Flock::FlockException => ex
505
+ result.ex = ex
506
+ end
507
+ write_result(result, oprot, 'replace_child_shard', seqid)
508
+ end
509
+
510
+ def process_list_shard_children(seqid, iprot, oprot)
511
+ args = read_args(iprot, List_shard_children_args)
512
+ result = List_shard_children_result.new()
513
+ begin
514
+ result.success = @handler.list_shard_children(args.shard_id)
515
+ rescue Flock::FlockException => ex
516
+ result.ex = ex
517
+ end
518
+ write_result(result, oprot, 'list_shard_children', seqid)
519
+ end
520
+
521
+ def process_mark_shard_busy(seqid, iprot, oprot)
522
+ args = read_args(iprot, Mark_shard_busy_args)
523
+ result = Mark_shard_busy_result.new()
524
+ begin
525
+ @handler.mark_shard_busy(args.shard_id, args.busy)
526
+ rescue Flock::FlockException => ex
527
+ result.ex = ex
528
+ end
529
+ write_result(result, oprot, 'mark_shard_busy', seqid)
530
+ end
531
+
532
+ def process_copy_shard(seqid, iprot, oprot)
533
+ args = read_args(iprot, Copy_shard_args)
534
+ result = Copy_shard_result.new()
535
+ begin
536
+ @handler.copy_shard(args.source_shard_id, args.destination_shard_id)
537
+ rescue Flock::FlockException => ex
538
+ result.ex = ex
539
+ end
540
+ write_result(result, oprot, 'copy_shard', seqid)
541
+ end
542
+
543
+ def process_setup_migration(seqid, iprot, oprot)
544
+ args = read_args(iprot, Setup_migration_args)
545
+ result = Setup_migration_result.new()
546
+ begin
547
+ result.success = @handler.setup_migration(args.source_shard_info, args.destination_shard_info)
548
+ rescue Flock::FlockException => ex
549
+ result.ex = ex
550
+ end
551
+ write_result(result, oprot, 'setup_migration', seqid)
552
+ end
553
+
554
+ def process_migrate_shard(seqid, iprot, oprot)
555
+ args = read_args(iprot, Migrate_shard_args)
556
+ result = Migrate_shard_result.new()
557
+ begin
558
+ @handler.migrate_shard(args.migration)
559
+ rescue Flock::FlockException => ex
560
+ result.ex = ex
561
+ end
562
+ write_result(result, oprot, 'migrate_shard', seqid)
563
+ end
564
+
565
+ def process_set_forwarding(seqid, iprot, oprot)
566
+ args = read_args(iprot, Set_forwarding_args)
567
+ result = Set_forwarding_result.new()
568
+ begin
569
+ @handler.set_forwarding(args.forwarding)
570
+ rescue Flock::FlockException => ex
571
+ result.ex = ex
572
+ end
573
+ write_result(result, oprot, 'set_forwarding', seqid)
574
+ end
575
+
576
+ def process_replace_forwarding(seqid, iprot, oprot)
577
+ args = read_args(iprot, Replace_forwarding_args)
578
+ result = Replace_forwarding_result.new()
579
+ begin
580
+ @handler.replace_forwarding(args.old_shard_id, args.new_shard_id)
581
+ rescue Flock::FlockException => ex
582
+ result.ex = ex
583
+ end
584
+ write_result(result, oprot, 'replace_forwarding', seqid)
585
+ end
586
+
587
+ def process_get_forwarding(seqid, iprot, oprot)
588
+ args = read_args(iprot, Get_forwarding_args)
589
+ result = Get_forwarding_result.new()
590
+ begin
591
+ result.success = @handler.get_forwarding(args.table_id, args.base_id)
592
+ rescue Flock::FlockException => ex
593
+ result.ex = ex
594
+ end
595
+ write_result(result, oprot, 'get_forwarding', seqid)
596
+ end
597
+
598
+ def process_get_forwarding_for_shard(seqid, iprot, oprot)
599
+ args = read_args(iprot, Get_forwarding_for_shard_args)
600
+ result = Get_forwarding_for_shard_result.new()
601
+ begin
602
+ result.success = @handler.get_forwarding_for_shard(args.shard_id)
603
+ rescue Flock::FlockException => ex
604
+ result.ex = ex
605
+ end
606
+ write_result(result, oprot, 'get_forwarding_for_shard', seqid)
607
+ end
608
+
609
+ def process_get_forwardings(seqid, iprot, oprot)
610
+ args = read_args(iprot, Get_forwardings_args)
611
+ result = Get_forwardings_result.new()
612
+ begin
613
+ result.success = @handler.get_forwardings()
614
+ rescue Flock::FlockException => ex
615
+ result.ex = ex
616
+ end
617
+ write_result(result, oprot, 'get_forwardings', seqid)
618
+ end
619
+
620
+ def process_reload_forwardings(seqid, iprot, oprot)
621
+ args = read_args(iprot, Reload_forwardings_args)
622
+ result = Reload_forwardings_result.new()
623
+ begin
624
+ @handler.reload_forwardings()
625
+ rescue Flock::FlockException => ex
626
+ result.ex = ex
627
+ end
628
+ write_result(result, oprot, 'reload_forwardings', seqid)
629
+ end
630
+
631
+ def process_find_current_forwarding(seqid, iprot, oprot)
632
+ args = read_args(iprot, Find_current_forwarding_args)
633
+ result = Find_current_forwarding_result.new()
634
+ begin
635
+ result.success = @handler.find_current_forwarding(args.table_id, args.id)
636
+ rescue Flock::FlockException => ex
637
+ result.ex = ex
638
+ end
639
+ write_result(result, oprot, 'find_current_forwarding', seqid)
640
+ end
641
+
642
+ def process_shard_ids_for_hostname(seqid, iprot, oprot)
643
+ args = read_args(iprot, Shard_ids_for_hostname_args)
644
+ result = Shard_ids_for_hostname_result.new()
645
+ begin
646
+ result.success = @handler.shard_ids_for_hostname(args.hostname, args.class_name)
647
+ rescue Flock::FlockException => ex
648
+ result.ex = ex
649
+ end
650
+ write_result(result, oprot, 'shard_ids_for_hostname', seqid)
651
+ end
652
+
653
+ def process_shards_for_hostname(seqid, iprot, oprot)
654
+ args = read_args(iprot, Shards_for_hostname_args)
655
+ result = Shards_for_hostname_result.new()
656
+ begin
657
+ result.success = @handler.shards_for_hostname(args.hostname, args.class_name)
658
+ rescue Flock::FlockException => ex
659
+ result.ex = ex
660
+ end
661
+ write_result(result, oprot, 'shards_for_hostname', seqid)
662
+ end
663
+
664
+ def process_get_busy_shards(seqid, iprot, oprot)
665
+ args = read_args(iprot, Get_busy_shards_args)
666
+ result = Get_busy_shards_result.new()
667
+ begin
668
+ result.success = @handler.get_busy_shards()
669
+ rescue Flock::FlockException => ex
670
+ result.ex = ex
671
+ end
672
+ write_result(result, oprot, 'get_busy_shards', seqid)
673
+ end
674
+
675
+ def process_get_parent_shard(seqid, iprot, oprot)
676
+ args = read_args(iprot, Get_parent_shard_args)
677
+ result = Get_parent_shard_result.new()
678
+ begin
679
+ result.success = @handler.get_parent_shard(args.shard_id)
680
+ rescue Flock::FlockException => ex
681
+ result.ex = ex
682
+ end
683
+ write_result(result, oprot, 'get_parent_shard', seqid)
684
+ end
685
+
686
+ def process_get_root_shard(seqid, iprot, oprot)
687
+ args = read_args(iprot, Get_root_shard_args)
688
+ result = Get_root_shard_result.new()
689
+ begin
690
+ result.success = @handler.get_root_shard(args.shard_id)
691
+ rescue Flock::FlockException => ex
692
+ result.ex = ex
693
+ end
694
+ write_result(result, oprot, 'get_root_shard', seqid)
695
+ end
696
+
697
+ def process_get_child_shards_of_class(seqid, iprot, oprot)
698
+ args = read_args(iprot, Get_child_shards_of_class_args)
699
+ result = Get_child_shards_of_class_result.new()
700
+ begin
701
+ result.success = @handler.get_child_shards_of_class(args.parent_shard_id, args.class_name)
702
+ rescue Flock::FlockException => ex
703
+ result.ex = ex
704
+ end
705
+ write_result(result, oprot, 'get_child_shards_of_class', seqid)
706
+ end
707
+
708
+ end
709
+
710
+ # HELPER FUNCTIONS AND STRUCTURES
711
+
712
+ class Create_shard_args
713
+ include ::Thrift::Struct
714
+ SHARD = 1
715
+
716
+ ::Thrift::Struct.field_accessor self, :shard
717
+ FIELDS = {
718
+ SHARD => {:type => ::Thrift::Types::STRUCT, :name => 'shard', :class => Flock::ShardInfo}
719
+ }
720
+
721
+ def struct_fields; FIELDS; end
722
+
723
+ def validate
724
+ end
725
+
726
+ end
727
+
728
+ class Create_shard_result
729
+ include ::Thrift::Struct
730
+ SUCCESS = 0
731
+ EX = -1
732
+
733
+ ::Thrift::Struct.field_accessor self, :success, :ex
734
+ FIELDS = {
735
+ SUCCESS => {:type => ::Thrift::Types::I32, :name => 'success'},
736
+ EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => Flock::FlockException}
737
+ }
738
+
739
+ def struct_fields; FIELDS; end
740
+
741
+ def validate
742
+ end
743
+
744
+ end
745
+
746
+ class Find_shard_args
747
+ include ::Thrift::Struct
748
+ SHARD = 1
749
+
750
+ ::Thrift::Struct.field_accessor self, :shard
751
+ FIELDS = {
752
+ SHARD => {:type => ::Thrift::Types::STRUCT, :name => 'shard', :class => Flock::ShardInfo}
753
+ }
754
+
755
+ def struct_fields; FIELDS; end
756
+
757
+ def validate
758
+ end
759
+
760
+ end
761
+
762
+ class Find_shard_result
763
+ include ::Thrift::Struct
764
+ SUCCESS = 0
765
+ EX = -1
766
+
767
+ ::Thrift::Struct.field_accessor self, :success, :ex
768
+ FIELDS = {
769
+ SUCCESS => {:type => ::Thrift::Types::I32, :name => 'success'},
770
+ EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => Flock::FlockException}
771
+ }
772
+
773
+ def struct_fields; FIELDS; end
774
+
775
+ def validate
776
+ end
777
+
778
+ end
779
+
780
+ class Get_shard_args
781
+ include ::Thrift::Struct
782
+ SHARD_ID = 1
783
+
784
+ ::Thrift::Struct.field_accessor self, :shard_id
785
+ FIELDS = {
786
+ SHARD_ID => {:type => ::Thrift::Types::I32, :name => 'shard_id'}
787
+ }
788
+
789
+ def struct_fields; FIELDS; end
790
+
791
+ def validate
792
+ end
793
+
794
+ end
795
+
796
+ class Get_shard_result
797
+ include ::Thrift::Struct
798
+ SUCCESS = 0
799
+ EX = -1
800
+
801
+ ::Thrift::Struct.field_accessor self, :success, :ex
802
+ FIELDS = {
803
+ SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => Flock::ShardInfo},
804
+ EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => Flock::FlockException}
805
+ }
806
+
807
+ def struct_fields; FIELDS; end
808
+
809
+ def validate
810
+ end
811
+
812
+ end
813
+
814
+ class Update_shard_args
815
+ include ::Thrift::Struct
816
+ SHARD = 1
817
+
818
+ ::Thrift::Struct.field_accessor self, :shard
819
+ FIELDS = {
820
+ SHARD => {:type => ::Thrift::Types::STRUCT, :name => 'shard', :class => Flock::ShardInfo}
821
+ }
822
+
823
+ def struct_fields; FIELDS; end
824
+
825
+ def validate
826
+ end
827
+
828
+ end
829
+
830
+ class Update_shard_result
831
+ include ::Thrift::Struct
832
+ EX = -1
833
+
834
+ ::Thrift::Struct.field_accessor self, :ex
835
+ FIELDS = {
836
+ EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => Flock::FlockException}
837
+ }
838
+
839
+ def struct_fields; FIELDS; end
840
+
841
+ def validate
842
+ end
843
+
844
+ end
845
+
846
+ class Delete_shard_args
847
+ include ::Thrift::Struct
848
+ SHARD_ID = 1
849
+
850
+ ::Thrift::Struct.field_accessor self, :shard_id
851
+ FIELDS = {
852
+ SHARD_ID => {:type => ::Thrift::Types::I32, :name => 'shard_id'}
853
+ }
854
+
855
+ def struct_fields; FIELDS; end
856
+
857
+ def validate
858
+ end
859
+
860
+ end
861
+
862
+ class Delete_shard_result
863
+ include ::Thrift::Struct
864
+ EX = -1
865
+
866
+ ::Thrift::Struct.field_accessor self, :ex
867
+ FIELDS = {
868
+ EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => Flock::FlockException}
869
+ }
870
+
871
+ def struct_fields; FIELDS; end
872
+
873
+ def validate
874
+ end
875
+
876
+ end
877
+
878
+ class Add_child_shard_args
879
+ include ::Thrift::Struct
880
+ PARENT_SHARD_ID = 1
881
+ CHILD_SHARD_ID = 2
882
+ POSITION = 3
883
+ WEIGHT = 4
884
+
885
+ ::Thrift::Struct.field_accessor self, :parent_shard_id, :child_shard_id, :position, :weight
886
+ FIELDS = {
887
+ PARENT_SHARD_ID => {:type => ::Thrift::Types::I32, :name => 'parent_shard_id'},
888
+ CHILD_SHARD_ID => {:type => ::Thrift::Types::I32, :name => 'child_shard_id'},
889
+ POSITION => {:type => ::Thrift::Types::I32, :name => 'position'},
890
+ WEIGHT => {:type => ::Thrift::Types::I32, :name => 'weight'}
891
+ }
892
+
893
+ def struct_fields; FIELDS; end
894
+
895
+ def validate
896
+ end
897
+
898
+ end
899
+
900
+ class Add_child_shard_result
901
+ include ::Thrift::Struct
902
+ EX = -1
903
+
904
+ ::Thrift::Struct.field_accessor self, :ex
905
+ FIELDS = {
906
+ EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => Flock::FlockException}
907
+ }
908
+
909
+ def struct_fields; FIELDS; end
910
+
911
+ def validate
912
+ end
913
+
914
+ end
915
+
916
+ class Remove_child_shard_args
917
+ include ::Thrift::Struct
918
+ PARENT_SHARD_ID = 1
919
+ CHILD_SHARD_ID = 2
920
+
921
+ ::Thrift::Struct.field_accessor self, :parent_shard_id, :child_shard_id
922
+ FIELDS = {
923
+ PARENT_SHARD_ID => {:type => ::Thrift::Types::I32, :name => 'parent_shard_id'},
924
+ CHILD_SHARD_ID => {:type => ::Thrift::Types::I32, :name => 'child_shard_id'}
925
+ }
926
+
927
+ def struct_fields; FIELDS; end
928
+
929
+ def validate
930
+ end
931
+
932
+ end
933
+
934
+ class Remove_child_shard_result
935
+ include ::Thrift::Struct
936
+ EX = -1
937
+
938
+ ::Thrift::Struct.field_accessor self, :ex
939
+ FIELDS = {
940
+ EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => Flock::FlockException}
941
+ }
942
+
943
+ def struct_fields; FIELDS; end
944
+
945
+ def validate
946
+ end
947
+
948
+ end
949
+
950
+ class Replace_child_shard_args
951
+ include ::Thrift::Struct
952
+ OLD_CHILD_SHARD_ID = 1
953
+ NEW_CHILD_SHARD_ID = 2
954
+
955
+ ::Thrift::Struct.field_accessor self, :old_child_shard_id, :new_child_shard_id
956
+ FIELDS = {
957
+ OLD_CHILD_SHARD_ID => {:type => ::Thrift::Types::I32, :name => 'old_child_shard_id'},
958
+ NEW_CHILD_SHARD_ID => {:type => ::Thrift::Types::I32, :name => 'new_child_shard_id'}
959
+ }
960
+
961
+ def struct_fields; FIELDS; end
962
+
963
+ def validate
964
+ end
965
+
966
+ end
967
+
968
+ class Replace_child_shard_result
969
+ include ::Thrift::Struct
970
+ EX = -1
971
+
972
+ ::Thrift::Struct.field_accessor self, :ex
973
+ FIELDS = {
974
+ EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => Flock::FlockException}
975
+ }
976
+
977
+ def struct_fields; FIELDS; end
978
+
979
+ def validate
980
+ end
981
+
982
+ end
983
+
984
+ class List_shard_children_args
985
+ include ::Thrift::Struct
986
+ SHARD_ID = 1
987
+
988
+ ::Thrift::Struct.field_accessor self, :shard_id
989
+ FIELDS = {
990
+ SHARD_ID => {:type => ::Thrift::Types::I32, :name => 'shard_id'}
991
+ }
992
+
993
+ def struct_fields; FIELDS; end
994
+
995
+ def validate
996
+ end
997
+
998
+ end
999
+
1000
+ class List_shard_children_result
1001
+ include ::Thrift::Struct
1002
+ SUCCESS = 0
1003
+ EX = -1
1004
+
1005
+ ::Thrift::Struct.field_accessor self, :success, :ex
1006
+ FIELDS = {
1007
+ SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => Flock::ShardChild}},
1008
+ EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => Flock::FlockException}
1009
+ }
1010
+
1011
+ def struct_fields; FIELDS; end
1012
+
1013
+ def validate
1014
+ end
1015
+
1016
+ end
1017
+
1018
+ class Mark_shard_busy_args
1019
+ include ::Thrift::Struct
1020
+ SHARD_ID = 1
1021
+ BUSY = 2
1022
+
1023
+ ::Thrift::Struct.field_accessor self, :shard_id, :busy
1024
+ FIELDS = {
1025
+ SHARD_ID => {:type => ::Thrift::Types::I32, :name => 'shard_id'},
1026
+ BUSY => {:type => ::Thrift::Types::I32, :name => 'busy'}
1027
+ }
1028
+
1029
+ def struct_fields; FIELDS; end
1030
+
1031
+ def validate
1032
+ end
1033
+
1034
+ end
1035
+
1036
+ class Mark_shard_busy_result
1037
+ include ::Thrift::Struct
1038
+ EX = -1
1039
+
1040
+ ::Thrift::Struct.field_accessor self, :ex
1041
+ FIELDS = {
1042
+ EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => Flock::FlockException}
1043
+ }
1044
+
1045
+ def struct_fields; FIELDS; end
1046
+
1047
+ def validate
1048
+ end
1049
+
1050
+ end
1051
+
1052
+ class Copy_shard_args
1053
+ include ::Thrift::Struct
1054
+ SOURCE_SHARD_ID = 1
1055
+ DESTINATION_SHARD_ID = 2
1056
+
1057
+ ::Thrift::Struct.field_accessor self, :source_shard_id, :destination_shard_id
1058
+ FIELDS = {
1059
+ SOURCE_SHARD_ID => {:type => ::Thrift::Types::I32, :name => 'source_shard_id'},
1060
+ DESTINATION_SHARD_ID => {:type => ::Thrift::Types::I32, :name => 'destination_shard_id'}
1061
+ }
1062
+
1063
+ def struct_fields; FIELDS; end
1064
+
1065
+ def validate
1066
+ end
1067
+
1068
+ end
1069
+
1070
+ class Copy_shard_result
1071
+ include ::Thrift::Struct
1072
+ EX = -1
1073
+
1074
+ ::Thrift::Struct.field_accessor self, :ex
1075
+ FIELDS = {
1076
+ EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => Flock::FlockException}
1077
+ }
1078
+
1079
+ def struct_fields; FIELDS; end
1080
+
1081
+ def validate
1082
+ end
1083
+
1084
+ end
1085
+
1086
+ class Setup_migration_args
1087
+ include ::Thrift::Struct
1088
+ SOURCE_SHARD_INFO = 1
1089
+ DESTINATION_SHARD_INFO = 2
1090
+
1091
+ ::Thrift::Struct.field_accessor self, :source_shard_info, :destination_shard_info
1092
+ FIELDS = {
1093
+ SOURCE_SHARD_INFO => {:type => ::Thrift::Types::STRUCT, :name => 'source_shard_info', :class => Flock::ShardInfo},
1094
+ DESTINATION_SHARD_INFO => {:type => ::Thrift::Types::STRUCT, :name => 'destination_shard_info', :class => Flock::ShardInfo}
1095
+ }
1096
+
1097
+ def struct_fields; FIELDS; end
1098
+
1099
+ def validate
1100
+ end
1101
+
1102
+ end
1103
+
1104
+ class Setup_migration_result
1105
+ include ::Thrift::Struct
1106
+ SUCCESS = 0
1107
+ EX = -1
1108
+
1109
+ ::Thrift::Struct.field_accessor self, :success, :ex
1110
+ FIELDS = {
1111
+ SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => Flock::ShardMigration},
1112
+ EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => Flock::FlockException}
1113
+ }
1114
+
1115
+ def struct_fields; FIELDS; end
1116
+
1117
+ def validate
1118
+ end
1119
+
1120
+ end
1121
+
1122
+ class Migrate_shard_args
1123
+ include ::Thrift::Struct
1124
+ MIGRATION = 1
1125
+
1126
+ ::Thrift::Struct.field_accessor self, :migration
1127
+ FIELDS = {
1128
+ MIGRATION => {:type => ::Thrift::Types::STRUCT, :name => 'migration', :class => Flock::ShardMigration}
1129
+ }
1130
+
1131
+ def struct_fields; FIELDS; end
1132
+
1133
+ def validate
1134
+ end
1135
+
1136
+ end
1137
+
1138
+ class Migrate_shard_result
1139
+ include ::Thrift::Struct
1140
+ EX = -1
1141
+
1142
+ ::Thrift::Struct.field_accessor self, :ex
1143
+ FIELDS = {
1144
+ EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => Flock::FlockException}
1145
+ }
1146
+
1147
+ def struct_fields; FIELDS; end
1148
+
1149
+ def validate
1150
+ end
1151
+
1152
+ end
1153
+
1154
+ class Set_forwarding_args
1155
+ include ::Thrift::Struct
1156
+ FORWARDING = 1
1157
+
1158
+ ::Thrift::Struct.field_accessor self, :forwarding
1159
+ FIELDS = {
1160
+ FORWARDING => {:type => ::Thrift::Types::STRUCT, :name => 'forwarding', :class => Flock::Forwarding}
1161
+ }
1162
+
1163
+ def struct_fields; FIELDS; end
1164
+
1165
+ def validate
1166
+ end
1167
+
1168
+ end
1169
+
1170
+ class Set_forwarding_result
1171
+ include ::Thrift::Struct
1172
+ EX = -1
1173
+
1174
+ ::Thrift::Struct.field_accessor self, :ex
1175
+ FIELDS = {
1176
+ EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => Flock::FlockException}
1177
+ }
1178
+
1179
+ def struct_fields; FIELDS; end
1180
+
1181
+ def validate
1182
+ end
1183
+
1184
+ end
1185
+
1186
+ class Replace_forwarding_args
1187
+ include ::Thrift::Struct
1188
+ OLD_SHARD_ID = 1
1189
+ NEW_SHARD_ID = 2
1190
+
1191
+ ::Thrift::Struct.field_accessor self, :old_shard_id, :new_shard_id
1192
+ FIELDS = {
1193
+ OLD_SHARD_ID => {:type => ::Thrift::Types::I32, :name => 'old_shard_id'},
1194
+ NEW_SHARD_ID => {:type => ::Thrift::Types::I32, :name => 'new_shard_id'}
1195
+ }
1196
+
1197
+ def struct_fields; FIELDS; end
1198
+
1199
+ def validate
1200
+ end
1201
+
1202
+ end
1203
+
1204
+ class Replace_forwarding_result
1205
+ include ::Thrift::Struct
1206
+ EX = -1
1207
+
1208
+ ::Thrift::Struct.field_accessor self, :ex
1209
+ FIELDS = {
1210
+ EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => Flock::FlockException}
1211
+ }
1212
+
1213
+ def struct_fields; FIELDS; end
1214
+
1215
+ def validate
1216
+ end
1217
+
1218
+ end
1219
+
1220
+ class Get_forwarding_args
1221
+ include ::Thrift::Struct
1222
+ TABLE_ID = 1
1223
+ BASE_ID = 2
1224
+
1225
+ ::Thrift::Struct.field_accessor self, :table_id, :base_id
1226
+ FIELDS = {
1227
+ TABLE_ID => {:type => ::Thrift::Types::LIST, :name => 'table_id', :element => {:type => ::Thrift::Types::I32}},
1228
+ BASE_ID => {:type => ::Thrift::Types::I64, :name => 'base_id'}
1229
+ }
1230
+
1231
+ def struct_fields; FIELDS; end
1232
+
1233
+ def validate
1234
+ end
1235
+
1236
+ end
1237
+
1238
+ class Get_forwarding_result
1239
+ include ::Thrift::Struct
1240
+ SUCCESS = 0
1241
+ EX = -1
1242
+
1243
+ ::Thrift::Struct.field_accessor self, :success, :ex
1244
+ FIELDS = {
1245
+ SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => Flock::ShardInfo},
1246
+ EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => Flock::FlockException}
1247
+ }
1248
+
1249
+ def struct_fields; FIELDS; end
1250
+
1251
+ def validate
1252
+ end
1253
+
1254
+ end
1255
+
1256
+ class Get_forwarding_for_shard_args
1257
+ include ::Thrift::Struct
1258
+ SHARD_ID = 1
1259
+
1260
+ ::Thrift::Struct.field_accessor self, :shard_id
1261
+ FIELDS = {
1262
+ SHARD_ID => {:type => ::Thrift::Types::I32, :name => 'shard_id'}
1263
+ }
1264
+
1265
+ def struct_fields; FIELDS; end
1266
+
1267
+ def validate
1268
+ end
1269
+
1270
+ end
1271
+
1272
+ class Get_forwarding_for_shard_result
1273
+ include ::Thrift::Struct
1274
+ SUCCESS = 0
1275
+ EX = -1
1276
+
1277
+ ::Thrift::Struct.field_accessor self, :success, :ex
1278
+ FIELDS = {
1279
+ SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => Flock::Forwarding},
1280
+ EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => Flock::FlockException}
1281
+ }
1282
+
1283
+ def struct_fields; FIELDS; end
1284
+
1285
+ def validate
1286
+ end
1287
+
1288
+ end
1289
+
1290
+ class Get_forwardings_args
1291
+ include ::Thrift::Struct
1292
+
1293
+ FIELDS = {
1294
+
1295
+ }
1296
+
1297
+ def struct_fields; FIELDS; end
1298
+
1299
+ def validate
1300
+ end
1301
+
1302
+ end
1303
+
1304
+ class Get_forwardings_result
1305
+ include ::Thrift::Struct
1306
+ SUCCESS = 0
1307
+ EX = -1
1308
+
1309
+ ::Thrift::Struct.field_accessor self, :success, :ex
1310
+ FIELDS = {
1311
+ SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => Flock::Forwarding}},
1312
+ EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => Flock::FlockException}
1313
+ }
1314
+
1315
+ def struct_fields; FIELDS; end
1316
+
1317
+ def validate
1318
+ end
1319
+
1320
+ end
1321
+
1322
+ class Reload_forwardings_args
1323
+ include ::Thrift::Struct
1324
+
1325
+ FIELDS = {
1326
+
1327
+ }
1328
+
1329
+ def struct_fields; FIELDS; end
1330
+
1331
+ def validate
1332
+ end
1333
+
1334
+ end
1335
+
1336
+ class Reload_forwardings_result
1337
+ include ::Thrift::Struct
1338
+ EX = -1
1339
+
1340
+ ::Thrift::Struct.field_accessor self, :ex
1341
+ FIELDS = {
1342
+ EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => Flock::FlockException}
1343
+ }
1344
+
1345
+ def struct_fields; FIELDS; end
1346
+
1347
+ def validate
1348
+ end
1349
+
1350
+ end
1351
+
1352
+ class Find_current_forwarding_args
1353
+ include ::Thrift::Struct
1354
+ TABLE_ID = 1
1355
+ ID = 2
1356
+
1357
+ ::Thrift::Struct.field_accessor self, :table_id, :id
1358
+ FIELDS = {
1359
+ TABLE_ID => {:type => ::Thrift::Types::LIST, :name => 'table_id', :element => {:type => ::Thrift::Types::I32}},
1360
+ ID => {:type => ::Thrift::Types::I64, :name => 'id'}
1361
+ }
1362
+
1363
+ def struct_fields; FIELDS; end
1364
+
1365
+ def validate
1366
+ end
1367
+
1368
+ end
1369
+
1370
+ class Find_current_forwarding_result
1371
+ include ::Thrift::Struct
1372
+ SUCCESS = 0
1373
+ EX = -1
1374
+
1375
+ ::Thrift::Struct.field_accessor self, :success, :ex
1376
+ FIELDS = {
1377
+ SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => Flock::ShardInfo},
1378
+ EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => Flock::FlockException}
1379
+ }
1380
+
1381
+ def struct_fields; FIELDS; end
1382
+
1383
+ def validate
1384
+ end
1385
+
1386
+ end
1387
+
1388
+ class Shard_ids_for_hostname_args
1389
+ include ::Thrift::Struct
1390
+ HOSTNAME = 1
1391
+ CLASS_NAME = 2
1392
+
1393
+ ::Thrift::Struct.field_accessor self, :hostname, :class_name
1394
+ FIELDS = {
1395
+ HOSTNAME => {:type => ::Thrift::Types::STRING, :name => 'hostname'},
1396
+ CLASS_NAME => {:type => ::Thrift::Types::STRING, :name => 'class_name'}
1397
+ }
1398
+
1399
+ def struct_fields; FIELDS; end
1400
+
1401
+ def validate
1402
+ end
1403
+
1404
+ end
1405
+
1406
+ class Shard_ids_for_hostname_result
1407
+ include ::Thrift::Struct
1408
+ SUCCESS = 0
1409
+ EX = -1
1410
+
1411
+ ::Thrift::Struct.field_accessor self, :success, :ex
1412
+ FIELDS = {
1413
+ SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::I32}},
1414
+ EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => Flock::FlockException}
1415
+ }
1416
+
1417
+ def struct_fields; FIELDS; end
1418
+
1419
+ def validate
1420
+ end
1421
+
1422
+ end
1423
+
1424
+ class Shards_for_hostname_args
1425
+ include ::Thrift::Struct
1426
+ HOSTNAME = 1
1427
+ CLASS_NAME = 2
1428
+
1429
+ ::Thrift::Struct.field_accessor self, :hostname, :class_name
1430
+ FIELDS = {
1431
+ HOSTNAME => {:type => ::Thrift::Types::STRING, :name => 'hostname'},
1432
+ CLASS_NAME => {:type => ::Thrift::Types::STRING, :name => 'class_name'}
1433
+ }
1434
+
1435
+ def struct_fields; FIELDS; end
1436
+
1437
+ def validate
1438
+ end
1439
+
1440
+ end
1441
+
1442
+ class Shards_for_hostname_result
1443
+ include ::Thrift::Struct
1444
+ SUCCESS = 0
1445
+ EX = -1
1446
+
1447
+ ::Thrift::Struct.field_accessor self, :success, :ex
1448
+ FIELDS = {
1449
+ SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => Flock::ShardInfo}},
1450
+ EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => Flock::FlockException}
1451
+ }
1452
+
1453
+ def struct_fields; FIELDS; end
1454
+
1455
+ def validate
1456
+ end
1457
+
1458
+ end
1459
+
1460
+ class Get_busy_shards_args
1461
+ include ::Thrift::Struct
1462
+
1463
+ FIELDS = {
1464
+
1465
+ }
1466
+
1467
+ def struct_fields; FIELDS; end
1468
+
1469
+ def validate
1470
+ end
1471
+
1472
+ end
1473
+
1474
+ class Get_busy_shards_result
1475
+ include ::Thrift::Struct
1476
+ SUCCESS = 0
1477
+ EX = -1
1478
+
1479
+ ::Thrift::Struct.field_accessor self, :success, :ex
1480
+ FIELDS = {
1481
+ SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => Flock::ShardInfo}},
1482
+ EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => Flock::FlockException}
1483
+ }
1484
+
1485
+ def struct_fields; FIELDS; end
1486
+
1487
+ def validate
1488
+ end
1489
+
1490
+ end
1491
+
1492
+ class Get_parent_shard_args
1493
+ include ::Thrift::Struct
1494
+ SHARD_ID = 1
1495
+
1496
+ ::Thrift::Struct.field_accessor self, :shard_id
1497
+ FIELDS = {
1498
+ SHARD_ID => {:type => ::Thrift::Types::I32, :name => 'shard_id'}
1499
+ }
1500
+
1501
+ def struct_fields; FIELDS; end
1502
+
1503
+ def validate
1504
+ end
1505
+
1506
+ end
1507
+
1508
+ class Get_parent_shard_result
1509
+ include ::Thrift::Struct
1510
+ SUCCESS = 0
1511
+ EX = -1
1512
+
1513
+ ::Thrift::Struct.field_accessor self, :success, :ex
1514
+ FIELDS = {
1515
+ SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => Flock::ShardInfo},
1516
+ EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => Flock::FlockException}
1517
+ }
1518
+
1519
+ def struct_fields; FIELDS; end
1520
+
1521
+ def validate
1522
+ end
1523
+
1524
+ end
1525
+
1526
+ class Get_root_shard_args
1527
+ include ::Thrift::Struct
1528
+ SHARD_ID = 1
1529
+
1530
+ ::Thrift::Struct.field_accessor self, :shard_id
1531
+ FIELDS = {
1532
+ SHARD_ID => {:type => ::Thrift::Types::I32, :name => 'shard_id'}
1533
+ }
1534
+
1535
+ def struct_fields; FIELDS; end
1536
+
1537
+ def validate
1538
+ end
1539
+
1540
+ end
1541
+
1542
+ class Get_root_shard_result
1543
+ include ::Thrift::Struct
1544
+ SUCCESS = 0
1545
+ EX = -1
1546
+
1547
+ ::Thrift::Struct.field_accessor self, :success, :ex
1548
+ FIELDS = {
1549
+ SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => Flock::ShardInfo},
1550
+ EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => Flock::FlockException}
1551
+ }
1552
+
1553
+ def struct_fields; FIELDS; end
1554
+
1555
+ def validate
1556
+ end
1557
+
1558
+ end
1559
+
1560
+ class Get_child_shards_of_class_args
1561
+ include ::Thrift::Struct
1562
+ PARENT_SHARD_ID = 1
1563
+ CLASS_NAME = 2
1564
+
1565
+ ::Thrift::Struct.field_accessor self, :parent_shard_id, :class_name
1566
+ FIELDS = {
1567
+ PARENT_SHARD_ID => {:type => ::Thrift::Types::I32, :name => 'parent_shard_id'},
1568
+ CLASS_NAME => {:type => ::Thrift::Types::STRING, :name => 'class_name'}
1569
+ }
1570
+
1571
+ def struct_fields; FIELDS; end
1572
+
1573
+ def validate
1574
+ end
1575
+
1576
+ end
1577
+
1578
+ class Get_child_shards_of_class_result
1579
+ include ::Thrift::Struct
1580
+ SUCCESS = 0
1581
+ EX = -1
1582
+
1583
+ ::Thrift::Struct.field_accessor self, :success, :ex
1584
+ FIELDS = {
1585
+ SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => Flock::ShardInfo}},
1586
+ EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => Flock::FlockException}
1587
+ }
1588
+
1589
+ def struct_fields; FIELDS; end
1590
+
1591
+ def validate
1592
+ end
1593
+
1594
+ end
1595
+
1596
+ end
1597
+
1598
+ end