Index: trunk/extensions/Cassandra/Cassandra_body.php |
— | — | @@ -0,0 +1,97 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +global $wgThriftRoot, $wgAutoloadClasses; |
| 5 | +$GLOBALS['THRIFT_ROOT'] = $wgThriftRoot; |
| 6 | + |
| 7 | +require_once( $GLOBALS['THRIFT_ROOT'] . '/Thrift.php' ); |
| 8 | + |
| 9 | +$thriftAutoloads = array( |
| 10 | + 'TBinaryProtocolAccelerated' => '/protocol/TBinaryProtocol.php', |
| 11 | + 'TProtocol' => '/protocol/TProtocol.php', |
| 12 | + 'TProtocolFactory' => '/protocol/TProtocol.php', |
| 13 | + 'TBinaryProtocol' => '/protocol/TBinaryProtocol.php', |
| 14 | + 'TBufferedTransport' => '/transport/TBufferedTransport.php', |
| 15 | + 'TFramedTransport' => '/transport/TFramedTransport.php', |
| 16 | + 'THttpClient' => '/transport/THttpClient.php', |
| 17 | + 'TNullTransport' => '/transport/TNullTransport.php', |
| 18 | + 'TPhpStream' => '/transport/TPhpStream.php', |
| 19 | + 'TSocket' => '/transport/TSocket.php', |
| 20 | + 'TSocketPool' => '/transport/TSocketPool.php', |
| 21 | + 'TTransport' => '/transport/TTransport.php', |
| 22 | + ); |
| 23 | + |
| 24 | +foreach ( $thriftAutoloads as $class => $file ) { |
| 25 | + $wgAutoloadClasses[$class] = $wgThriftRoot . $file; |
| 26 | +} |
| 27 | + |
| 28 | +require_once( dirname( __FILE__ ) . '/lib/Cassandra.php' ); |
| 29 | + |
| 30 | +class ExternalStoreCassandra { |
| 31 | + private $keyspace, $socket, $client; |
| 32 | + |
| 33 | + public function store( $cluster, $data ) { |
| 34 | + global $wgCassandraKeyPrefix, $wgCassandraWriteConsistency, $wgCassandraColumnFamily; |
| 35 | + $this->connect( $cluster ); |
| 36 | + $key = 'ES:' . $wgCassandraKeyPrefix . sha1( $data ); |
| 37 | + |
| 38 | + $columnPath = new cassandra_ColumnPath(); |
| 39 | + $columnPath->column = 'data'; |
| 40 | + $columnPath->super_column = null; |
| 41 | + $columnPath->column_family = $wgCassandraColumnFamily; |
| 42 | + |
| 43 | + $this->client->insert( $this->keyspace, $key, $columnPath, $data, time(), $wgCassandraWriteConsistency ); |
| 44 | + return "cassandra://$cluster/$key"; |
| 45 | + } |
| 46 | + |
| 47 | + function fetchFromURL( $url ) { |
| 48 | + global $wgCassandraReadConsistency, $wgCassandraColumnFamily; |
| 49 | + |
| 50 | + try{ |
| 51 | + $this->connect( $url ); |
| 52 | + $splitted = explode( '/', $url ); |
| 53 | + $key = end( $splitted ); |
| 54 | + |
| 55 | + $columnParent = new cassandra_ColumnParent(); |
| 56 | + $columnParent->column_family = $wgCassandraColumnFamily; |
| 57 | + $columnParent->super_column = null; |
| 58 | + |
| 59 | + $sliceRange = new cassandra_SliceRange(); |
| 60 | + $sliceRange->start = ""; |
| 61 | + $sliceRange->finish = ""; |
| 62 | + $predicate = new cassandra_SlicePredicate(); |
| 63 | + $predicate->slice_range = $sliceRange; |
| 64 | + |
| 65 | + $result = $this->client->get_slice($this->keyspace, $key, $columnParent, $predicate, $wgCassandraReadConsistency); |
| 66 | + |
| 67 | + return $result[0]->column->value; |
| 68 | + } catch ( TException $e ) { |
| 69 | + throw new MWCassandraException( $e ); |
| 70 | + } |
| 71 | + |
| 72 | + return false; |
| 73 | + } |
| 74 | + |
| 75 | + private function connect( $cluster ) { |
| 76 | + global $wgThriftPort; |
| 77 | + |
| 78 | + $cluster = str_replace( 'cassandra://', '', $cluster ); |
| 79 | + list( $host, $this->keyspace ) = explode( '/', $cluster ); |
| 80 | + |
| 81 | + $this->socket = new TSocket( $host, $wgThriftPort); |
| 82 | + $this->transport = new TBufferedTransport( $this->socket, 1024, 1024 ); |
| 83 | + $this->protocol = new TBinaryProtocolAccelerated( $this->transport ); |
| 84 | + $this->client = new CassandraClient( $this->protocol ); |
| 85 | + $this->transport->open(); |
| 86 | + } |
| 87 | +} |
| 88 | + |
| 89 | +class MWCassandraException extends MWException { |
| 90 | + public $innerException; |
| 91 | + |
| 92 | + public function __construct( TException $e ) { |
| 93 | + $this->innerException = $e; |
| 94 | + parent::__construct( 'Cassandra error ' . get_class( $e ) . ': ' . $e->__toString() |
| 95 | + . "\n\nStack trace: " . $e->getTraceAsString() |
| 96 | + ); |
| 97 | + } |
| 98 | +} |
\ No newline at end of file |
Property changes on: trunk/extensions/Cassandra/Cassandra_body.php |
___________________________________________________________________ |
Name: svn:eol-style |
1 | 99 | + native |
Index: trunk/extensions/Cassandra/Cassandra.php |
— | — | @@ -0,0 +1,44 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +if ( !defined( 'MEDIAWIKI' ) ) { |
| 5 | + die( "Not a valid entry point\n" ); |
| 6 | +} |
| 7 | + |
| 8 | +$wgExtensionCredits['other'][] = array( |
| 9 | + 'path' => __FILE__, |
| 10 | + 'name' => 'Cassandra', |
| 11 | + 'version' => 0.1, |
| 12 | + 'author' => 'Max Semenik', |
| 13 | + 'url' => 'http://www.mediawiki.org/wiki/Extension:Cassandra', |
| 14 | + 'description' => 'Allows to store revision text in [http://incubator.apache.org/cassandra/ Apache Cassandra] database.', |
| 15 | + //'descriptionmsg' => 'cassandra-desc', |
| 16 | +); |
| 17 | + |
| 18 | +$wgAutoloadClasses['ExternalStoreCassandra'] = dirname( __FILE__ ) . '/Cassandra_body.php'; |
| 19 | + |
| 20 | +if ( is_array( $wgExternalStores ) ) { |
| 21 | + $wgExternalStores[] = 'cassandra'; |
| 22 | +} else { |
| 23 | + $wgExternalStores = array( 'cassandra' ); |
| 24 | +} |
| 25 | + |
| 26 | +/** |
| 27 | + * Extension settings |
| 28 | + */ |
| 29 | + |
| 30 | +// Directory where Thrift for PHP resides. |
| 31 | +$wgThriftRoot = '/usr/share/php/Thrift'; |
| 32 | +$wgThriftPort = 9160; |
| 33 | +$wgCassandraKeyPrefix = ''; |
| 34 | + |
| 35 | +/** |
| 36 | + * Read and write consistencies, see http://wiki.apache.org/cassandra/API#ConsistencyLevel |
| 37 | + * for details. |
| 38 | + * Avoid using cassandra_ConsistencyLevel here to prevent large parts |
| 39 | + * of Cassandra and Thrift from being loaded on every request. Shouldn't |
| 40 | + * matter for real-world setups with byte code cache though. |
| 41 | + */ |
| 42 | +$wgCassandraReadConsistency = 1; // cassandra_ConsistencyLevel::ONE |
| 43 | +$wgCassandraWriteConsistency = 1; // cassandra_ConsistencyLevel::ONE |
| 44 | + |
| 45 | +$wgCassandraColumnFamily = 'Standard1'; |
\ No newline at end of file |
Property changes on: trunk/extensions/Cassandra/Cassandra.php |
___________________________________________________________________ |
Name: svn:eol-style |
1 | 46 | + native |
Index: trunk/extensions/Cassandra/lib/cassandra_constants.php |
— | — | @@ -0,0 +1,13 @@ |
| 2 | +<?php |
| 3 | +/** |
| 4 | + * Autogenerated by Thrift |
| 5 | + * |
| 6 | + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING |
| 7 | + */ |
| 8 | +include_once $GLOBALS['THRIFT_ROOT'].'/packages/cassandra/cassandra_types.php'; |
| 9 | + |
| 10 | +$GLOBALS['cassandra_CONSTANTS'] = array(); |
| 11 | + |
| 12 | +$GLOBALS['cassandra_CONSTANTS']['VERSION'] = "0.5.1"; |
| 13 | + |
| 14 | +?> |
\ No newline at end of file |
Property changes on: trunk/extensions/Cassandra/lib/cassandra_constants.php |
___________________________________________________________________ |
Name: svn:eol-style |
1 | 15 | + native |
Index: trunk/extensions/Cassandra/lib/Cassandra.php |
— | — | @@ -0,0 +1,4587 @@ |
| 2 | +<?php |
| 3 | +/** |
| 4 | + * Autogenerated by Thrift |
| 5 | + * |
| 6 | + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING |
| 7 | + */ |
| 8 | +include_once $GLOBALS['THRIFT_ROOT'].'/Thrift.php'; |
| 9 | + |
| 10 | +include_once $GLOBALS['THRIFT_ROOT'].'/packages/cassandra/cassandra_types.php'; |
| 11 | + |
| 12 | +interface CassandraIf { |
| 13 | + public function get($keyspace, $key, $column_path, $consistency_level); |
| 14 | + public function get_slice($keyspace, $key, $column_parent, $predicate, $consistency_level); |
| 15 | + public function multiget($keyspace, $keys, $column_path, $consistency_level); |
| 16 | + public function multiget_slice($keyspace, $keys, $column_parent, $predicate, $consistency_level); |
| 17 | + public function get_count($keyspace, $key, $column_parent, $consistency_level); |
| 18 | + public function get_key_range($keyspace, $column_family, $start, $finish, $count, $consistency_level); |
| 19 | + public function get_range_slice($keyspace, $column_parent, $predicate, $start_key, $finish_key, $row_count, $consistency_level); |
| 20 | + public function insert($keyspace, $key, $column_path, $value, $timestamp, $consistency_level); |
| 21 | + public function batch_insert($keyspace, $key, $cfmap, $consistency_level); |
| 22 | + public function remove($keyspace, $key, $column_path, $timestamp, $consistency_level); |
| 23 | + public function get_string_property($property); |
| 24 | + public function get_string_list_property($property); |
| 25 | + public function describe_keyspace($keyspace); |
| 26 | +} |
| 27 | + |
| 28 | +class CassandraClient implements CassandraIf { |
| 29 | + protected $input_ = null; |
| 30 | + protected $output_ = null; |
| 31 | + |
| 32 | + protected $seqid_ = 0; |
| 33 | + |
| 34 | + public function __construct($input, $output=null) { |
| 35 | + $this->input_ = $input; |
| 36 | + $this->output_ = $output ? $output : $input; |
| 37 | + } |
| 38 | + |
| 39 | + public function get($keyspace, $key, $column_path, $consistency_level) |
| 40 | + { |
| 41 | + $this->send_get($keyspace, $key, $column_path, $consistency_level); |
| 42 | + return $this->recv_get(); |
| 43 | + } |
| 44 | + |
| 45 | + public function send_get($keyspace, $key, $column_path, $consistency_level) |
| 46 | + { |
| 47 | + $args = new cassandra_Cassandra_get_args(); |
| 48 | + $args->keyspace = $keyspace; |
| 49 | + $args->key = $key; |
| 50 | + $args->column_path = $column_path; |
| 51 | + $args->consistency_level = $consistency_level; |
| 52 | + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); |
| 53 | + if ($bin_accel) |
| 54 | + { |
| 55 | + thrift_protocol_write_binary($this->output_, 'get', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); |
| 56 | + } |
| 57 | + else |
| 58 | + { |
| 59 | + $this->output_->writeMessageBegin('get', TMessageType::CALL, $this->seqid_); |
| 60 | + $args->write($this->output_); |
| 61 | + $this->output_->writeMessageEnd(); |
| 62 | + $this->output_->getTransport()->flush(); |
| 63 | + } |
| 64 | + } |
| 65 | + |
| 66 | + public function recv_get() |
| 67 | + { |
| 68 | + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); |
| 69 | + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'cassandra_Cassandra_get_result', $this->input_->isStrictRead()); |
| 70 | + else |
| 71 | + { |
| 72 | + $rseqid = 0; |
| 73 | + $fname = null; |
| 74 | + $mtype = 0; |
| 75 | + |
| 76 | + $this->input_->readMessageBegin($fname, $mtype, $rseqid); |
| 77 | + if ($mtype == TMessageType::EXCEPTION) { |
| 78 | + $x = new TApplicationException(); |
| 79 | + $x->read($this->input_); |
| 80 | + $this->input_->readMessageEnd(); |
| 81 | + throw $x; |
| 82 | + } |
| 83 | + $result = new cassandra_Cassandra_get_result(); |
| 84 | + $result->read($this->input_); |
| 85 | + $this->input_->readMessageEnd(); |
| 86 | + } |
| 87 | + if ($result->success !== null) { |
| 88 | + return $result->success; |
| 89 | + } |
| 90 | + if ($result->ire !== null) { |
| 91 | + throw $result->ire; |
| 92 | + } |
| 93 | + if ($result->nfe !== null) { |
| 94 | + throw $result->nfe; |
| 95 | + } |
| 96 | + if ($result->ue !== null) { |
| 97 | + throw $result->ue; |
| 98 | + } |
| 99 | + if ($result->te !== null) { |
| 100 | + throw $result->te; |
| 101 | + } |
| 102 | + throw new Exception("get failed: unknown result"); |
| 103 | + } |
| 104 | + |
| 105 | + public function get_slice($keyspace, $key, $column_parent, $predicate, $consistency_level) |
| 106 | + { |
| 107 | + $this->send_get_slice($keyspace, $key, $column_parent, $predicate, $consistency_level); |
| 108 | + return $this->recv_get_slice(); |
| 109 | + } |
| 110 | + |
| 111 | + public function send_get_slice($keyspace, $key, $column_parent, $predicate, $consistency_level) |
| 112 | + { |
| 113 | + $args = new cassandra_Cassandra_get_slice_args(); |
| 114 | + $args->keyspace = $keyspace; |
| 115 | + $args->key = $key; |
| 116 | + $args->column_parent = $column_parent; |
| 117 | + $args->predicate = $predicate; |
| 118 | + $args->consistency_level = $consistency_level; |
| 119 | + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); |
| 120 | + if ($bin_accel) |
| 121 | + { |
| 122 | + thrift_protocol_write_binary($this->output_, 'get_slice', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); |
| 123 | + } |
| 124 | + else |
| 125 | + { |
| 126 | + $this->output_->writeMessageBegin('get_slice', TMessageType::CALL, $this->seqid_); |
| 127 | + $args->write($this->output_); |
| 128 | + $this->output_->writeMessageEnd(); |
| 129 | + $this->output_->getTransport()->flush(); |
| 130 | + } |
| 131 | + } |
| 132 | + |
| 133 | + public function recv_get_slice() |
| 134 | + { |
| 135 | + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); |
| 136 | + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'cassandra_Cassandra_get_slice_result', $this->input_->isStrictRead()); |
| 137 | + else |
| 138 | + { |
| 139 | + $rseqid = 0; |
| 140 | + $fname = null; |
| 141 | + $mtype = 0; |
| 142 | + |
| 143 | + $this->input_->readMessageBegin($fname, $mtype, $rseqid); |
| 144 | + if ($mtype == TMessageType::EXCEPTION) { |
| 145 | + $x = new TApplicationException(); |
| 146 | + $x->read($this->input_); |
| 147 | + $this->input_->readMessageEnd(); |
| 148 | + throw $x; |
| 149 | + } |
| 150 | + $result = new cassandra_Cassandra_get_slice_result(); |
| 151 | + $result->read($this->input_); |
| 152 | + $this->input_->readMessageEnd(); |
| 153 | + } |
| 154 | + if ($result->success !== null) { |
| 155 | + return $result->success; |
| 156 | + } |
| 157 | + if ($result->ire !== null) { |
| 158 | + throw $result->ire; |
| 159 | + } |
| 160 | + if ($result->ue !== null) { |
| 161 | + throw $result->ue; |
| 162 | + } |
| 163 | + if ($result->te !== null) { |
| 164 | + throw $result->te; |
| 165 | + } |
| 166 | + throw new Exception("get_slice failed: unknown result"); |
| 167 | + } |
| 168 | + |
| 169 | + public function multiget($keyspace, $keys, $column_path, $consistency_level) |
| 170 | + { |
| 171 | + $this->send_multiget($keyspace, $keys, $column_path, $consistency_level); |
| 172 | + return $this->recv_multiget(); |
| 173 | + } |
| 174 | + |
| 175 | + public function send_multiget($keyspace, $keys, $column_path, $consistency_level) |
| 176 | + { |
| 177 | + $args = new cassandra_Cassandra_multiget_args(); |
| 178 | + $args->keyspace = $keyspace; |
| 179 | + $args->keys = $keys; |
| 180 | + $args->column_path = $column_path; |
| 181 | + $args->consistency_level = $consistency_level; |
| 182 | + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); |
| 183 | + if ($bin_accel) |
| 184 | + { |
| 185 | + thrift_protocol_write_binary($this->output_, 'multiget', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); |
| 186 | + } |
| 187 | + else |
| 188 | + { |
| 189 | + $this->output_->writeMessageBegin('multiget', TMessageType::CALL, $this->seqid_); |
| 190 | + $args->write($this->output_); |
| 191 | + $this->output_->writeMessageEnd(); |
| 192 | + $this->output_->getTransport()->flush(); |
| 193 | + } |
| 194 | + } |
| 195 | + |
| 196 | + public function recv_multiget() |
| 197 | + { |
| 198 | + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); |
| 199 | + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'cassandra_Cassandra_multiget_result', $this->input_->isStrictRead()); |
| 200 | + else |
| 201 | + { |
| 202 | + $rseqid = 0; |
| 203 | + $fname = null; |
| 204 | + $mtype = 0; |
| 205 | + |
| 206 | + $this->input_->readMessageBegin($fname, $mtype, $rseqid); |
| 207 | + if ($mtype == TMessageType::EXCEPTION) { |
| 208 | + $x = new TApplicationException(); |
| 209 | + $x->read($this->input_); |
| 210 | + $this->input_->readMessageEnd(); |
| 211 | + throw $x; |
| 212 | + } |
| 213 | + $result = new cassandra_Cassandra_multiget_result(); |
| 214 | + $result->read($this->input_); |
| 215 | + $this->input_->readMessageEnd(); |
| 216 | + } |
| 217 | + if ($result->success !== null) { |
| 218 | + return $result->success; |
| 219 | + } |
| 220 | + if ($result->ire !== null) { |
| 221 | + throw $result->ire; |
| 222 | + } |
| 223 | + if ($result->ue !== null) { |
| 224 | + throw $result->ue; |
| 225 | + } |
| 226 | + if ($result->te !== null) { |
| 227 | + throw $result->te; |
| 228 | + } |
| 229 | + throw new Exception("multiget failed: unknown result"); |
| 230 | + } |
| 231 | + |
| 232 | + public function multiget_slice($keyspace, $keys, $column_parent, $predicate, $consistency_level) |
| 233 | + { |
| 234 | + $this->send_multiget_slice($keyspace, $keys, $column_parent, $predicate, $consistency_level); |
| 235 | + return $this->recv_multiget_slice(); |
| 236 | + } |
| 237 | + |
| 238 | + public function send_multiget_slice($keyspace, $keys, $column_parent, $predicate, $consistency_level) |
| 239 | + { |
| 240 | + $args = new cassandra_Cassandra_multiget_slice_args(); |
| 241 | + $args->keyspace = $keyspace; |
| 242 | + $args->keys = $keys; |
| 243 | + $args->column_parent = $column_parent; |
| 244 | + $args->predicate = $predicate; |
| 245 | + $args->consistency_level = $consistency_level; |
| 246 | + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); |
| 247 | + if ($bin_accel) |
| 248 | + { |
| 249 | + thrift_protocol_write_binary($this->output_, 'multiget_slice', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); |
| 250 | + } |
| 251 | + else |
| 252 | + { |
| 253 | + $this->output_->writeMessageBegin('multiget_slice', TMessageType::CALL, $this->seqid_); |
| 254 | + $args->write($this->output_); |
| 255 | + $this->output_->writeMessageEnd(); |
| 256 | + $this->output_->getTransport()->flush(); |
| 257 | + } |
| 258 | + } |
| 259 | + |
| 260 | + public function recv_multiget_slice() |
| 261 | + { |
| 262 | + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); |
| 263 | + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'cassandra_Cassandra_multiget_slice_result', $this->input_->isStrictRead()); |
| 264 | + else |
| 265 | + { |
| 266 | + $rseqid = 0; |
| 267 | + $fname = null; |
| 268 | + $mtype = 0; |
| 269 | + |
| 270 | + $this->input_->readMessageBegin($fname, $mtype, $rseqid); |
| 271 | + if ($mtype == TMessageType::EXCEPTION) { |
| 272 | + $x = new TApplicationException(); |
| 273 | + $x->read($this->input_); |
| 274 | + $this->input_->readMessageEnd(); |
| 275 | + throw $x; |
| 276 | + } |
| 277 | + $result = new cassandra_Cassandra_multiget_slice_result(); |
| 278 | + $result->read($this->input_); |
| 279 | + $this->input_->readMessageEnd(); |
| 280 | + } |
| 281 | + if ($result->success !== null) { |
| 282 | + return $result->success; |
| 283 | + } |
| 284 | + if ($result->ire !== null) { |
| 285 | + throw $result->ire; |
| 286 | + } |
| 287 | + if ($result->ue !== null) { |
| 288 | + throw $result->ue; |
| 289 | + } |
| 290 | + if ($result->te !== null) { |
| 291 | + throw $result->te; |
| 292 | + } |
| 293 | + throw new Exception("multiget_slice failed: unknown result"); |
| 294 | + } |
| 295 | + |
| 296 | + public function get_count($keyspace, $key, $column_parent, $consistency_level) |
| 297 | + { |
| 298 | + $this->send_get_count($keyspace, $key, $column_parent, $consistency_level); |
| 299 | + return $this->recv_get_count(); |
| 300 | + } |
| 301 | + |
| 302 | + public function send_get_count($keyspace, $key, $column_parent, $consistency_level) |
| 303 | + { |
| 304 | + $args = new cassandra_Cassandra_get_count_args(); |
| 305 | + $args->keyspace = $keyspace; |
| 306 | + $args->key = $key; |
| 307 | + $args->column_parent = $column_parent; |
| 308 | + $args->consistency_level = $consistency_level; |
| 309 | + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); |
| 310 | + if ($bin_accel) |
| 311 | + { |
| 312 | + thrift_protocol_write_binary($this->output_, 'get_count', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); |
| 313 | + } |
| 314 | + else |
| 315 | + { |
| 316 | + $this->output_->writeMessageBegin('get_count', TMessageType::CALL, $this->seqid_); |
| 317 | + $args->write($this->output_); |
| 318 | + $this->output_->writeMessageEnd(); |
| 319 | + $this->output_->getTransport()->flush(); |
| 320 | + } |
| 321 | + } |
| 322 | + |
| 323 | + public function recv_get_count() |
| 324 | + { |
| 325 | + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); |
| 326 | + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'cassandra_Cassandra_get_count_result', $this->input_->isStrictRead()); |
| 327 | + else |
| 328 | + { |
| 329 | + $rseqid = 0; |
| 330 | + $fname = null; |
| 331 | + $mtype = 0; |
| 332 | + |
| 333 | + $this->input_->readMessageBegin($fname, $mtype, $rseqid); |
| 334 | + if ($mtype == TMessageType::EXCEPTION) { |
| 335 | + $x = new TApplicationException(); |
| 336 | + $x->read($this->input_); |
| 337 | + $this->input_->readMessageEnd(); |
| 338 | + throw $x; |
| 339 | + } |
| 340 | + $result = new cassandra_Cassandra_get_count_result(); |
| 341 | + $result->read($this->input_); |
| 342 | + $this->input_->readMessageEnd(); |
| 343 | + } |
| 344 | + if ($result->success !== null) { |
| 345 | + return $result->success; |
| 346 | + } |
| 347 | + if ($result->ire !== null) { |
| 348 | + throw $result->ire; |
| 349 | + } |
| 350 | + if ($result->ue !== null) { |
| 351 | + throw $result->ue; |
| 352 | + } |
| 353 | + if ($result->te !== null) { |
| 354 | + throw $result->te; |
| 355 | + } |
| 356 | + throw new Exception("get_count failed: unknown result"); |
| 357 | + } |
| 358 | + |
| 359 | + public function get_key_range($keyspace, $column_family, $start, $finish, $count, $consistency_level) |
| 360 | + { |
| 361 | + $this->send_get_key_range($keyspace, $column_family, $start, $finish, $count, $consistency_level); |
| 362 | + return $this->recv_get_key_range(); |
| 363 | + } |
| 364 | + |
| 365 | + public function send_get_key_range($keyspace, $column_family, $start, $finish, $count, $consistency_level) |
| 366 | + { |
| 367 | + $args = new cassandra_Cassandra_get_key_range_args(); |
| 368 | + $args->keyspace = $keyspace; |
| 369 | + $args->column_family = $column_family; |
| 370 | + $args->start = $start; |
| 371 | + $args->finish = $finish; |
| 372 | + $args->count = $count; |
| 373 | + $args->consistency_level = $consistency_level; |
| 374 | + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); |
| 375 | + if ($bin_accel) |
| 376 | + { |
| 377 | + thrift_protocol_write_binary($this->output_, 'get_key_range', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); |
| 378 | + } |
| 379 | + else |
| 380 | + { |
| 381 | + $this->output_->writeMessageBegin('get_key_range', TMessageType::CALL, $this->seqid_); |
| 382 | + $args->write($this->output_); |
| 383 | + $this->output_->writeMessageEnd(); |
| 384 | + $this->output_->getTransport()->flush(); |
| 385 | + } |
| 386 | + } |
| 387 | + |
| 388 | + public function recv_get_key_range() |
| 389 | + { |
| 390 | + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); |
| 391 | + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'cassandra_Cassandra_get_key_range_result', $this->input_->isStrictRead()); |
| 392 | + else |
| 393 | + { |
| 394 | + $rseqid = 0; |
| 395 | + $fname = null; |
| 396 | + $mtype = 0; |
| 397 | + |
| 398 | + $this->input_->readMessageBegin($fname, $mtype, $rseqid); |
| 399 | + if ($mtype == TMessageType::EXCEPTION) { |
| 400 | + $x = new TApplicationException(); |
| 401 | + $x->read($this->input_); |
| 402 | + $this->input_->readMessageEnd(); |
| 403 | + throw $x; |
| 404 | + } |
| 405 | + $result = new cassandra_Cassandra_get_key_range_result(); |
| 406 | + $result->read($this->input_); |
| 407 | + $this->input_->readMessageEnd(); |
| 408 | + } |
| 409 | + if ($result->success !== null) { |
| 410 | + return $result->success; |
| 411 | + } |
| 412 | + if ($result->ire !== null) { |
| 413 | + throw $result->ire; |
| 414 | + } |
| 415 | + if ($result->ue !== null) { |
| 416 | + throw $result->ue; |
| 417 | + } |
| 418 | + if ($result->te !== null) { |
| 419 | + throw $result->te; |
| 420 | + } |
| 421 | + throw new Exception("get_key_range failed: unknown result"); |
| 422 | + } |
| 423 | + |
| 424 | + public function get_range_slice($keyspace, $column_parent, $predicate, $start_key, $finish_key, $row_count, $consistency_level) |
| 425 | + { |
| 426 | + $this->send_get_range_slice($keyspace, $column_parent, $predicate, $start_key, $finish_key, $row_count, $consistency_level); |
| 427 | + return $this->recv_get_range_slice(); |
| 428 | + } |
| 429 | + |
| 430 | + public function send_get_range_slice($keyspace, $column_parent, $predicate, $start_key, $finish_key, $row_count, $consistency_level) |
| 431 | + { |
| 432 | + $args = new cassandra_Cassandra_get_range_slice_args(); |
| 433 | + $args->keyspace = $keyspace; |
| 434 | + $args->column_parent = $column_parent; |
| 435 | + $args->predicate = $predicate; |
| 436 | + $args->start_key = $start_key; |
| 437 | + $args->finish_key = $finish_key; |
| 438 | + $args->row_count = $row_count; |
| 439 | + $args->consistency_level = $consistency_level; |
| 440 | + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); |
| 441 | + if ($bin_accel) |
| 442 | + { |
| 443 | + thrift_protocol_write_binary($this->output_, 'get_range_slice', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); |
| 444 | + } |
| 445 | + else |
| 446 | + { |
| 447 | + $this->output_->writeMessageBegin('get_range_slice', TMessageType::CALL, $this->seqid_); |
| 448 | + $args->write($this->output_); |
| 449 | + $this->output_->writeMessageEnd(); |
| 450 | + $this->output_->getTransport()->flush(); |
| 451 | + } |
| 452 | + } |
| 453 | + |
| 454 | + public function recv_get_range_slice() |
| 455 | + { |
| 456 | + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); |
| 457 | + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'cassandra_Cassandra_get_range_slice_result', $this->input_->isStrictRead()); |
| 458 | + else |
| 459 | + { |
| 460 | + $rseqid = 0; |
| 461 | + $fname = null; |
| 462 | + $mtype = 0; |
| 463 | + |
| 464 | + $this->input_->readMessageBegin($fname, $mtype, $rseqid); |
| 465 | + if ($mtype == TMessageType::EXCEPTION) { |
| 466 | + $x = new TApplicationException(); |
| 467 | + $x->read($this->input_); |
| 468 | + $this->input_->readMessageEnd(); |
| 469 | + throw $x; |
| 470 | + } |
| 471 | + $result = new cassandra_Cassandra_get_range_slice_result(); |
| 472 | + $result->read($this->input_); |
| 473 | + $this->input_->readMessageEnd(); |
| 474 | + } |
| 475 | + if ($result->success !== null) { |
| 476 | + return $result->success; |
| 477 | + } |
| 478 | + if ($result->ire !== null) { |
| 479 | + throw $result->ire; |
| 480 | + } |
| 481 | + if ($result->ue !== null) { |
| 482 | + throw $result->ue; |
| 483 | + } |
| 484 | + if ($result->te !== null) { |
| 485 | + throw $result->te; |
| 486 | + } |
| 487 | + throw new Exception("get_range_slice failed: unknown result"); |
| 488 | + } |
| 489 | + |
| 490 | + public function insert($keyspace, $key, $column_path, $value, $timestamp, $consistency_level) |
| 491 | + { |
| 492 | + $this->send_insert($keyspace, $key, $column_path, $value, $timestamp, $consistency_level); |
| 493 | + $this->recv_insert(); |
| 494 | + } |
| 495 | + |
| 496 | + public function send_insert($keyspace, $key, $column_path, $value, $timestamp, $consistency_level) |
| 497 | + { |
| 498 | + $args = new cassandra_Cassandra_insert_args(); |
| 499 | + $args->keyspace = $keyspace; |
| 500 | + $args->key = $key; |
| 501 | + $args->column_path = $column_path; |
| 502 | + $args->value = $value; |
| 503 | + $args->timestamp = $timestamp; |
| 504 | + $args->consistency_level = $consistency_level; |
| 505 | + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); |
| 506 | + if ($bin_accel) |
| 507 | + { |
| 508 | + thrift_protocol_write_binary($this->output_, 'insert', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); |
| 509 | + } |
| 510 | + else |
| 511 | + { |
| 512 | + $this->output_->writeMessageBegin('insert', TMessageType::CALL, $this->seqid_); |
| 513 | + $args->write($this->output_); |
| 514 | + $this->output_->writeMessageEnd(); |
| 515 | + $this->output_->getTransport()->flush(); |
| 516 | + } |
| 517 | + } |
| 518 | + |
| 519 | + public function recv_insert() |
| 520 | + { |
| 521 | + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); |
| 522 | + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'cassandra_Cassandra_insert_result', $this->input_->isStrictRead()); |
| 523 | + else |
| 524 | + { |
| 525 | + $rseqid = 0; |
| 526 | + $fname = null; |
| 527 | + $mtype = 0; |
| 528 | + |
| 529 | + $this->input_->readMessageBegin($fname, $mtype, $rseqid); |
| 530 | + if ($mtype == TMessageType::EXCEPTION) { |
| 531 | + $x = new TApplicationException(); |
| 532 | + $x->read($this->input_); |
| 533 | + $this->input_->readMessageEnd(); |
| 534 | + throw $x; |
| 535 | + } |
| 536 | + $result = new cassandra_Cassandra_insert_result(); |
| 537 | + $result->read($this->input_); |
| 538 | + $this->input_->readMessageEnd(); |
| 539 | + } |
| 540 | + if ($result->ire !== null) { |
| 541 | + throw $result->ire; |
| 542 | + } |
| 543 | + if ($result->ue !== null) { |
| 544 | + throw $result->ue; |
| 545 | + } |
| 546 | + if ($result->te !== null) { |
| 547 | + throw $result->te; |
| 548 | + } |
| 549 | + return; |
| 550 | + } |
| 551 | + |
| 552 | + public function batch_insert($keyspace, $key, $cfmap, $consistency_level) |
| 553 | + { |
| 554 | + $this->send_batch_insert($keyspace, $key, $cfmap, $consistency_level); |
| 555 | + $this->recv_batch_insert(); |
| 556 | + } |
| 557 | + |
| 558 | + public function send_batch_insert($keyspace, $key, $cfmap, $consistency_level) |
| 559 | + { |
| 560 | + $args = new cassandra_Cassandra_batch_insert_args(); |
| 561 | + $args->keyspace = $keyspace; |
| 562 | + $args->key = $key; |
| 563 | + $args->cfmap = $cfmap; |
| 564 | + $args->consistency_level = $consistency_level; |
| 565 | + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); |
| 566 | + if ($bin_accel) |
| 567 | + { |
| 568 | + thrift_protocol_write_binary($this->output_, 'batch_insert', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); |
| 569 | + } |
| 570 | + else |
| 571 | + { |
| 572 | + $this->output_->writeMessageBegin('batch_insert', TMessageType::CALL, $this->seqid_); |
| 573 | + $args->write($this->output_); |
| 574 | + $this->output_->writeMessageEnd(); |
| 575 | + $this->output_->getTransport()->flush(); |
| 576 | + } |
| 577 | + } |
| 578 | + |
| 579 | + public function recv_batch_insert() |
| 580 | + { |
| 581 | + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); |
| 582 | + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'cassandra_Cassandra_batch_insert_result', $this->input_->isStrictRead()); |
| 583 | + else |
| 584 | + { |
| 585 | + $rseqid = 0; |
| 586 | + $fname = null; |
| 587 | + $mtype = 0; |
| 588 | + |
| 589 | + $this->input_->readMessageBegin($fname, $mtype, $rseqid); |
| 590 | + if ($mtype == TMessageType::EXCEPTION) { |
| 591 | + $x = new TApplicationException(); |
| 592 | + $x->read($this->input_); |
| 593 | + $this->input_->readMessageEnd(); |
| 594 | + throw $x; |
| 595 | + } |
| 596 | + $result = new cassandra_Cassandra_batch_insert_result(); |
| 597 | + $result->read($this->input_); |
| 598 | + $this->input_->readMessageEnd(); |
| 599 | + } |
| 600 | + if ($result->ire !== null) { |
| 601 | + throw $result->ire; |
| 602 | + } |
| 603 | + if ($result->ue !== null) { |
| 604 | + throw $result->ue; |
| 605 | + } |
| 606 | + if ($result->te !== null) { |
| 607 | + throw $result->te; |
| 608 | + } |
| 609 | + return; |
| 610 | + } |
| 611 | + |
| 612 | + public function remove($keyspace, $key, $column_path, $timestamp, $consistency_level) |
| 613 | + { |
| 614 | + $this->send_remove($keyspace, $key, $column_path, $timestamp, $consistency_level); |
| 615 | + $this->recv_remove(); |
| 616 | + } |
| 617 | + |
| 618 | + public function send_remove($keyspace, $key, $column_path, $timestamp, $consistency_level) |
| 619 | + { |
| 620 | + $args = new cassandra_Cassandra_remove_args(); |
| 621 | + $args->keyspace = $keyspace; |
| 622 | + $args->key = $key; |
| 623 | + $args->column_path = $column_path; |
| 624 | + $args->timestamp = $timestamp; |
| 625 | + $args->consistency_level = $consistency_level; |
| 626 | + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); |
| 627 | + if ($bin_accel) |
| 628 | + { |
| 629 | + thrift_protocol_write_binary($this->output_, 'remove', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); |
| 630 | + } |
| 631 | + else |
| 632 | + { |
| 633 | + $this->output_->writeMessageBegin('remove', TMessageType::CALL, $this->seqid_); |
| 634 | + $args->write($this->output_); |
| 635 | + $this->output_->writeMessageEnd(); |
| 636 | + $this->output_->getTransport()->flush(); |
| 637 | + } |
| 638 | + } |
| 639 | + |
| 640 | + public function recv_remove() |
| 641 | + { |
| 642 | + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); |
| 643 | + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'cassandra_Cassandra_remove_result', $this->input_->isStrictRead()); |
| 644 | + else |
| 645 | + { |
| 646 | + $rseqid = 0; |
| 647 | + $fname = null; |
| 648 | + $mtype = 0; |
| 649 | + |
| 650 | + $this->input_->readMessageBegin($fname, $mtype, $rseqid); |
| 651 | + if ($mtype == TMessageType::EXCEPTION) { |
| 652 | + $x = new TApplicationException(); |
| 653 | + $x->read($this->input_); |
| 654 | + $this->input_->readMessageEnd(); |
| 655 | + throw $x; |
| 656 | + } |
| 657 | + $result = new cassandra_Cassandra_remove_result(); |
| 658 | + $result->read($this->input_); |
| 659 | + $this->input_->readMessageEnd(); |
| 660 | + } |
| 661 | + if ($result->ire !== null) { |
| 662 | + throw $result->ire; |
| 663 | + } |
| 664 | + if ($result->ue !== null) { |
| 665 | + throw $result->ue; |
| 666 | + } |
| 667 | + if ($result->te !== null) { |
| 668 | + throw $result->te; |
| 669 | + } |
| 670 | + return; |
| 671 | + } |
| 672 | + |
| 673 | + public function get_string_property($property) |
| 674 | + { |
| 675 | + $this->send_get_string_property($property); |
| 676 | + return $this->recv_get_string_property(); |
| 677 | + } |
| 678 | + |
| 679 | + public function send_get_string_property($property) |
| 680 | + { |
| 681 | + $args = new cassandra_Cassandra_get_string_property_args(); |
| 682 | + $args->property = $property; |
| 683 | + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); |
| 684 | + if ($bin_accel) |
| 685 | + { |
| 686 | + thrift_protocol_write_binary($this->output_, 'get_string_property', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); |
| 687 | + } |
| 688 | + else |
| 689 | + { |
| 690 | + $this->output_->writeMessageBegin('get_string_property', TMessageType::CALL, $this->seqid_); |
| 691 | + $args->write($this->output_); |
| 692 | + $this->output_->writeMessageEnd(); |
| 693 | + $this->output_->getTransport()->flush(); |
| 694 | + } |
| 695 | + } |
| 696 | + |
| 697 | + public function recv_get_string_property() |
| 698 | + { |
| 699 | + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); |
| 700 | + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'cassandra_Cassandra_get_string_property_result', $this->input_->isStrictRead()); |
| 701 | + else |
| 702 | + { |
| 703 | + $rseqid = 0; |
| 704 | + $fname = null; |
| 705 | + $mtype = 0; |
| 706 | + |
| 707 | + $this->input_->readMessageBegin($fname, $mtype, $rseqid); |
| 708 | + if ($mtype == TMessageType::EXCEPTION) { |
| 709 | + $x = new TApplicationException(); |
| 710 | + $x->read($this->input_); |
| 711 | + $this->input_->readMessageEnd(); |
| 712 | + throw $x; |
| 713 | + } |
| 714 | + $result = new cassandra_Cassandra_get_string_property_result(); |
| 715 | + $result->read($this->input_); |
| 716 | + $this->input_->readMessageEnd(); |
| 717 | + } |
| 718 | + if ($result->success !== null) { |
| 719 | + return $result->success; |
| 720 | + } |
| 721 | + throw new Exception("get_string_property failed: unknown result"); |
| 722 | + } |
| 723 | + |
| 724 | + public function get_string_list_property($property) |
| 725 | + { |
| 726 | + $this->send_get_string_list_property($property); |
| 727 | + return $this->recv_get_string_list_property(); |
| 728 | + } |
| 729 | + |
| 730 | + public function send_get_string_list_property($property) |
| 731 | + { |
| 732 | + $args = new cassandra_Cassandra_get_string_list_property_args(); |
| 733 | + $args->property = $property; |
| 734 | + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); |
| 735 | + if ($bin_accel) |
| 736 | + { |
| 737 | + thrift_protocol_write_binary($this->output_, 'get_string_list_property', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); |
| 738 | + } |
| 739 | + else |
| 740 | + { |
| 741 | + $this->output_->writeMessageBegin('get_string_list_property', TMessageType::CALL, $this->seqid_); |
| 742 | + $args->write($this->output_); |
| 743 | + $this->output_->writeMessageEnd(); |
| 744 | + $this->output_->getTransport()->flush(); |
| 745 | + } |
| 746 | + } |
| 747 | + |
| 748 | + public function recv_get_string_list_property() |
| 749 | + { |
| 750 | + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); |
| 751 | + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'cassandra_Cassandra_get_string_list_property_result', $this->input_->isStrictRead()); |
| 752 | + else |
| 753 | + { |
| 754 | + $rseqid = 0; |
| 755 | + $fname = null; |
| 756 | + $mtype = 0; |
| 757 | + |
| 758 | + $this->input_->readMessageBegin($fname, $mtype, $rseqid); |
| 759 | + if ($mtype == TMessageType::EXCEPTION) { |
| 760 | + $x = new TApplicationException(); |
| 761 | + $x->read($this->input_); |
| 762 | + $this->input_->readMessageEnd(); |
| 763 | + throw $x; |
| 764 | + } |
| 765 | + $result = new cassandra_Cassandra_get_string_list_property_result(); |
| 766 | + $result->read($this->input_); |
| 767 | + $this->input_->readMessageEnd(); |
| 768 | + } |
| 769 | + if ($result->success !== null) { |
| 770 | + return $result->success; |
| 771 | + } |
| 772 | + throw new Exception("get_string_list_property failed: unknown result"); |
| 773 | + } |
| 774 | + |
| 775 | + public function describe_keyspace($keyspace) |
| 776 | + { |
| 777 | + $this->send_describe_keyspace($keyspace); |
| 778 | + return $this->recv_describe_keyspace(); |
| 779 | + } |
| 780 | + |
| 781 | + public function send_describe_keyspace($keyspace) |
| 782 | + { |
| 783 | + $args = new cassandra_Cassandra_describe_keyspace_args(); |
| 784 | + $args->keyspace = $keyspace; |
| 785 | + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); |
| 786 | + if ($bin_accel) |
| 787 | + { |
| 788 | + thrift_protocol_write_binary($this->output_, 'describe_keyspace', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); |
| 789 | + } |
| 790 | + else |
| 791 | + { |
| 792 | + $this->output_->writeMessageBegin('describe_keyspace', TMessageType::CALL, $this->seqid_); |
| 793 | + $args->write($this->output_); |
| 794 | + $this->output_->writeMessageEnd(); |
| 795 | + $this->output_->getTransport()->flush(); |
| 796 | + } |
| 797 | + } |
| 798 | + |
| 799 | + public function recv_describe_keyspace() |
| 800 | + { |
| 801 | + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); |
| 802 | + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'cassandra_Cassandra_describe_keyspace_result', $this->input_->isStrictRead()); |
| 803 | + else |
| 804 | + { |
| 805 | + $rseqid = 0; |
| 806 | + $fname = null; |
| 807 | + $mtype = 0; |
| 808 | + |
| 809 | + $this->input_->readMessageBegin($fname, $mtype, $rseqid); |
| 810 | + if ($mtype == TMessageType::EXCEPTION) { |
| 811 | + $x = new TApplicationException(); |
| 812 | + $x->read($this->input_); |
| 813 | + $this->input_->readMessageEnd(); |
| 814 | + throw $x; |
| 815 | + } |
| 816 | + $result = new cassandra_Cassandra_describe_keyspace_result(); |
| 817 | + $result->read($this->input_); |
| 818 | + $this->input_->readMessageEnd(); |
| 819 | + } |
| 820 | + if ($result->success !== null) { |
| 821 | + return $result->success; |
| 822 | + } |
| 823 | + if ($result->nfe !== null) { |
| 824 | + throw $result->nfe; |
| 825 | + } |
| 826 | + throw new Exception("describe_keyspace failed: unknown result"); |
| 827 | + } |
| 828 | + |
| 829 | +} |
| 830 | + |
| 831 | +// HELPER FUNCTIONS AND STRUCTURES |
| 832 | + |
| 833 | +class cassandra_Cassandra_get_args { |
| 834 | + static $_TSPEC; |
| 835 | + |
| 836 | + public $keyspace = null; |
| 837 | + public $key = null; |
| 838 | + public $column_path = null; |
| 839 | + public $consistency_level = 1; |
| 840 | + |
| 841 | + public function __construct($vals=null) { |
| 842 | + if (!isset(self::$_TSPEC)) { |
| 843 | + self::$_TSPEC = array( |
| 844 | + 1 => array( |
| 845 | + 'var' => 'keyspace', |
| 846 | + 'type' => TType::STRING, |
| 847 | + ), |
| 848 | + 2 => array( |
| 849 | + 'var' => 'key', |
| 850 | + 'type' => TType::STRING, |
| 851 | + ), |
| 852 | + 3 => array( |
| 853 | + 'var' => 'column_path', |
| 854 | + 'type' => TType::STRUCT, |
| 855 | + 'class' => 'cassandra_ColumnPath', |
| 856 | + ), |
| 857 | + 4 => array( |
| 858 | + 'var' => 'consistency_level', |
| 859 | + 'type' => TType::I32, |
| 860 | + ), |
| 861 | + ); |
| 862 | + } |
| 863 | + if (is_array($vals)) { |
| 864 | + if (isset($vals['keyspace'])) { |
| 865 | + $this->keyspace = $vals['keyspace']; |
| 866 | + } |
| 867 | + if (isset($vals['key'])) { |
| 868 | + $this->key = $vals['key']; |
| 869 | + } |
| 870 | + if (isset($vals['column_path'])) { |
| 871 | + $this->column_path = $vals['column_path']; |
| 872 | + } |
| 873 | + if (isset($vals['consistency_level'])) { |
| 874 | + $this->consistency_level = $vals['consistency_level']; |
| 875 | + } |
| 876 | + } |
| 877 | + } |
| 878 | + |
| 879 | + public function getName() { |
| 880 | + return 'Cassandra_get_args'; |
| 881 | + } |
| 882 | + |
| 883 | + public function read($input) |
| 884 | + { |
| 885 | + $xfer = 0; |
| 886 | + $fname = null; |
| 887 | + $ftype = 0; |
| 888 | + $fid = 0; |
| 889 | + $xfer += $input->readStructBegin($fname); |
| 890 | + while (true) |
| 891 | + { |
| 892 | + $xfer += $input->readFieldBegin($fname, $ftype, $fid); |
| 893 | + if ($ftype == TType::STOP) { |
| 894 | + break; |
| 895 | + } |
| 896 | + switch ($fid) |
| 897 | + { |
| 898 | + case 1: |
| 899 | + if ($ftype == TType::STRING) { |
| 900 | + $xfer += $input->readString($this->keyspace); |
| 901 | + } else { |
| 902 | + $xfer += $input->skip($ftype); |
| 903 | + } |
| 904 | + break; |
| 905 | + case 2: |
| 906 | + if ($ftype == TType::STRING) { |
| 907 | + $xfer += $input->readString($this->key); |
| 908 | + } else { |
| 909 | + $xfer += $input->skip($ftype); |
| 910 | + } |
| 911 | + break; |
| 912 | + case 3: |
| 913 | + if ($ftype == TType::STRUCT) { |
| 914 | + $this->column_path = new cassandra_ColumnPath(); |
| 915 | + $xfer += $this->column_path->read($input); |
| 916 | + } else { |
| 917 | + $xfer += $input->skip($ftype); |
| 918 | + } |
| 919 | + break; |
| 920 | + case 4: |
| 921 | + if ($ftype == TType::I32) { |
| 922 | + $xfer += $input->readI32($this->consistency_level); |
| 923 | + } else { |
| 924 | + $xfer += $input->skip($ftype); |
| 925 | + } |
| 926 | + break; |
| 927 | + default: |
| 928 | + $xfer += $input->skip($ftype); |
| 929 | + break; |
| 930 | + } |
| 931 | + $xfer += $input->readFieldEnd(); |
| 932 | + } |
| 933 | + $xfer += $input->readStructEnd(); |
| 934 | + return $xfer; |
| 935 | + } |
| 936 | + |
| 937 | + public function write($output) { |
| 938 | + $xfer = 0; |
| 939 | + $xfer += $output->writeStructBegin('Cassandra_get_args'); |
| 940 | + if ($this->keyspace !== null) { |
| 941 | + $xfer += $output->writeFieldBegin('keyspace', TType::STRING, 1); |
| 942 | + $xfer += $output->writeString($this->keyspace); |
| 943 | + $xfer += $output->writeFieldEnd(); |
| 944 | + } |
| 945 | + if ($this->key !== null) { |
| 946 | + $xfer += $output->writeFieldBegin('key', TType::STRING, 2); |
| 947 | + $xfer += $output->writeString($this->key); |
| 948 | + $xfer += $output->writeFieldEnd(); |
| 949 | + } |
| 950 | + if ($this->column_path !== null) { |
| 951 | + if (!is_object($this->column_path)) { |
| 952 | + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); |
| 953 | + } |
| 954 | + $xfer += $output->writeFieldBegin('column_path', TType::STRUCT, 3); |
| 955 | + $xfer += $this->column_path->write($output); |
| 956 | + $xfer += $output->writeFieldEnd(); |
| 957 | + } |
| 958 | + if ($this->consistency_level !== null) { |
| 959 | + $xfer += $output->writeFieldBegin('consistency_level', TType::I32, 4); |
| 960 | + $xfer += $output->writeI32($this->consistency_level); |
| 961 | + $xfer += $output->writeFieldEnd(); |
| 962 | + } |
| 963 | + $xfer += $output->writeFieldStop(); |
| 964 | + $xfer += $output->writeStructEnd(); |
| 965 | + return $xfer; |
| 966 | + } |
| 967 | + |
| 968 | +} |
| 969 | + |
| 970 | +class cassandra_Cassandra_get_result { |
| 971 | + static $_TSPEC; |
| 972 | + |
| 973 | + public $success = null; |
| 974 | + public $ire = null; |
| 975 | + public $nfe = null; |
| 976 | + public $ue = null; |
| 977 | + public $te = null; |
| 978 | + |
| 979 | + public function __construct($vals=null) { |
| 980 | + if (!isset(self::$_TSPEC)) { |
| 981 | + self::$_TSPEC = array( |
| 982 | + 0 => array( |
| 983 | + 'var' => 'success', |
| 984 | + 'type' => TType::STRUCT, |
| 985 | + 'class' => 'cassandra_ColumnOrSuperColumn', |
| 986 | + ), |
| 987 | + 1 => array( |
| 988 | + 'var' => 'ire', |
| 989 | + 'type' => TType::STRUCT, |
| 990 | + 'class' => 'cassandra_InvalidRequestException', |
| 991 | + ), |
| 992 | + 2 => array( |
| 993 | + 'var' => 'nfe', |
| 994 | + 'type' => TType::STRUCT, |
| 995 | + 'class' => 'cassandra_NotFoundException', |
| 996 | + ), |
| 997 | + 3 => array( |
| 998 | + 'var' => 'ue', |
| 999 | + 'type' => TType::STRUCT, |
| 1000 | + 'class' => 'cassandra_UnavailableException', |
| 1001 | + ), |
| 1002 | + 4 => array( |
| 1003 | + 'var' => 'te', |
| 1004 | + 'type' => TType::STRUCT, |
| 1005 | + 'class' => 'cassandra_TimedOutException', |
| 1006 | + ), |
| 1007 | + ); |
| 1008 | + } |
| 1009 | + if (is_array($vals)) { |
| 1010 | + if (isset($vals['success'])) { |
| 1011 | + $this->success = $vals['success']; |
| 1012 | + } |
| 1013 | + if (isset($vals['ire'])) { |
| 1014 | + $this->ire = $vals['ire']; |
| 1015 | + } |
| 1016 | + if (isset($vals['nfe'])) { |
| 1017 | + $this->nfe = $vals['nfe']; |
| 1018 | + } |
| 1019 | + if (isset($vals['ue'])) { |
| 1020 | + $this->ue = $vals['ue']; |
| 1021 | + } |
| 1022 | + if (isset($vals['te'])) { |
| 1023 | + $this->te = $vals['te']; |
| 1024 | + } |
| 1025 | + } |
| 1026 | + } |
| 1027 | + |
| 1028 | + public function getName() { |
| 1029 | + return 'Cassandra_get_result'; |
| 1030 | + } |
| 1031 | + |
| 1032 | + public function read($input) |
| 1033 | + { |
| 1034 | + $xfer = 0; |
| 1035 | + $fname = null; |
| 1036 | + $ftype = 0; |
| 1037 | + $fid = 0; |
| 1038 | + $xfer += $input->readStructBegin($fname); |
| 1039 | + while (true) |
| 1040 | + { |
| 1041 | + $xfer += $input->readFieldBegin($fname, $ftype, $fid); |
| 1042 | + if ($ftype == TType::STOP) { |
| 1043 | + break; |
| 1044 | + } |
| 1045 | + switch ($fid) |
| 1046 | + { |
| 1047 | + case 0: |
| 1048 | + if ($ftype == TType::STRUCT) { |
| 1049 | + $this->success = new cassandra_ColumnOrSuperColumn(); |
| 1050 | + $xfer += $this->success->read($input); |
| 1051 | + } else { |
| 1052 | + $xfer += $input->skip($ftype); |
| 1053 | + } |
| 1054 | + break; |
| 1055 | + case 1: |
| 1056 | + if ($ftype == TType::STRUCT) { |
| 1057 | + $this->ire = new cassandra_InvalidRequestException(); |
| 1058 | + $xfer += $this->ire->read($input); |
| 1059 | + } else { |
| 1060 | + $xfer += $input->skip($ftype); |
| 1061 | + } |
| 1062 | + break; |
| 1063 | + case 2: |
| 1064 | + if ($ftype == TType::STRUCT) { |
| 1065 | + $this->nfe = new cassandra_NotFoundException(); |
| 1066 | + $xfer += $this->nfe->read($input); |
| 1067 | + } else { |
| 1068 | + $xfer += $input->skip($ftype); |
| 1069 | + } |
| 1070 | + break; |
| 1071 | + case 3: |
| 1072 | + if ($ftype == TType::STRUCT) { |
| 1073 | + $this->ue = new cassandra_UnavailableException(); |
| 1074 | + $xfer += $this->ue->read($input); |
| 1075 | + } else { |
| 1076 | + $xfer += $input->skip($ftype); |
| 1077 | + } |
| 1078 | + break; |
| 1079 | + case 4: |
| 1080 | + if ($ftype == TType::STRUCT) { |
| 1081 | + $this->te = new cassandra_TimedOutException(); |
| 1082 | + $xfer += $this->te->read($input); |
| 1083 | + } else { |
| 1084 | + $xfer += $input->skip($ftype); |
| 1085 | + } |
| 1086 | + break; |
| 1087 | + default: |
| 1088 | + $xfer += $input->skip($ftype); |
| 1089 | + break; |
| 1090 | + } |
| 1091 | + $xfer += $input->readFieldEnd(); |
| 1092 | + } |
| 1093 | + $xfer += $input->readStructEnd(); |
| 1094 | + return $xfer; |
| 1095 | + } |
| 1096 | + |
| 1097 | + public function write($output) { |
| 1098 | + $xfer = 0; |
| 1099 | + $xfer += $output->writeStructBegin('Cassandra_get_result'); |
| 1100 | + if ($this->success !== null) { |
| 1101 | + if (!is_object($this->success)) { |
| 1102 | + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); |
| 1103 | + } |
| 1104 | + $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0); |
| 1105 | + $xfer += $this->success->write($output); |
| 1106 | + $xfer += $output->writeFieldEnd(); |
| 1107 | + } |
| 1108 | + if ($this->ire !== null) { |
| 1109 | + $xfer += $output->writeFieldBegin('ire', TType::STRUCT, 1); |
| 1110 | + $xfer += $this->ire->write($output); |
| 1111 | + $xfer += $output->writeFieldEnd(); |
| 1112 | + } |
| 1113 | + if ($this->nfe !== null) { |
| 1114 | + $xfer += $output->writeFieldBegin('nfe', TType::STRUCT, 2); |
| 1115 | + $xfer += $this->nfe->write($output); |
| 1116 | + $xfer += $output->writeFieldEnd(); |
| 1117 | + } |
| 1118 | + if ($this->ue !== null) { |
| 1119 | + $xfer += $output->writeFieldBegin('ue', TType::STRUCT, 3); |
| 1120 | + $xfer += $this->ue->write($output); |
| 1121 | + $xfer += $output->writeFieldEnd(); |
| 1122 | + } |
| 1123 | + if ($this->te !== null) { |
| 1124 | + $xfer += $output->writeFieldBegin('te', TType::STRUCT, 4); |
| 1125 | + $xfer += $this->te->write($output); |
| 1126 | + $xfer += $output->writeFieldEnd(); |
| 1127 | + } |
| 1128 | + $xfer += $output->writeFieldStop(); |
| 1129 | + $xfer += $output->writeStructEnd(); |
| 1130 | + return $xfer; |
| 1131 | + } |
| 1132 | + |
| 1133 | +} |
| 1134 | + |
| 1135 | +class cassandra_Cassandra_get_slice_args { |
| 1136 | + static $_TSPEC; |
| 1137 | + |
| 1138 | + public $keyspace = null; |
| 1139 | + public $key = null; |
| 1140 | + public $column_parent = null; |
| 1141 | + public $predicate = null; |
| 1142 | + public $consistency_level = 1; |
| 1143 | + |
| 1144 | + public function __construct($vals=null) { |
| 1145 | + if (!isset(self::$_TSPEC)) { |
| 1146 | + self::$_TSPEC = array( |
| 1147 | + 1 => array( |
| 1148 | + 'var' => 'keyspace', |
| 1149 | + 'type' => TType::STRING, |
| 1150 | + ), |
| 1151 | + 2 => array( |
| 1152 | + 'var' => 'key', |
| 1153 | + 'type' => TType::STRING, |
| 1154 | + ), |
| 1155 | + 3 => array( |
| 1156 | + 'var' => 'column_parent', |
| 1157 | + 'type' => TType::STRUCT, |
| 1158 | + 'class' => 'cassandra_ColumnParent', |
| 1159 | + ), |
| 1160 | + 4 => array( |
| 1161 | + 'var' => 'predicate', |
| 1162 | + 'type' => TType::STRUCT, |
| 1163 | + 'class' => 'cassandra_SlicePredicate', |
| 1164 | + ), |
| 1165 | + 5 => array( |
| 1166 | + 'var' => 'consistency_level', |
| 1167 | + 'type' => TType::I32, |
| 1168 | + ), |
| 1169 | + ); |
| 1170 | + } |
| 1171 | + if (is_array($vals)) { |
| 1172 | + if (isset($vals['keyspace'])) { |
| 1173 | + $this->keyspace = $vals['keyspace']; |
| 1174 | + } |
| 1175 | + if (isset($vals['key'])) { |
| 1176 | + $this->key = $vals['key']; |
| 1177 | + } |
| 1178 | + if (isset($vals['column_parent'])) { |
| 1179 | + $this->column_parent = $vals['column_parent']; |
| 1180 | + } |
| 1181 | + if (isset($vals['predicate'])) { |
| 1182 | + $this->predicate = $vals['predicate']; |
| 1183 | + } |
| 1184 | + if (isset($vals['consistency_level'])) { |
| 1185 | + $this->consistency_level = $vals['consistency_level']; |
| 1186 | + } |
| 1187 | + } |
| 1188 | + } |
| 1189 | + |
| 1190 | + public function getName() { |
| 1191 | + return 'Cassandra_get_slice_args'; |
| 1192 | + } |
| 1193 | + |
| 1194 | + public function read($input) |
| 1195 | + { |
| 1196 | + $xfer = 0; |
| 1197 | + $fname = null; |
| 1198 | + $ftype = 0; |
| 1199 | + $fid = 0; |
| 1200 | + $xfer += $input->readStructBegin($fname); |
| 1201 | + while (true) |
| 1202 | + { |
| 1203 | + $xfer += $input->readFieldBegin($fname, $ftype, $fid); |
| 1204 | + if ($ftype == TType::STOP) { |
| 1205 | + break; |
| 1206 | + } |
| 1207 | + switch ($fid) |
| 1208 | + { |
| 1209 | + case 1: |
| 1210 | + if ($ftype == TType::STRING) { |
| 1211 | + $xfer += $input->readString($this->keyspace); |
| 1212 | + } else { |
| 1213 | + $xfer += $input->skip($ftype); |
| 1214 | + } |
| 1215 | + break; |
| 1216 | + case 2: |
| 1217 | + if ($ftype == TType::STRING) { |
| 1218 | + $xfer += $input->readString($this->key); |
| 1219 | + } else { |
| 1220 | + $xfer += $input->skip($ftype); |
| 1221 | + } |
| 1222 | + break; |
| 1223 | + case 3: |
| 1224 | + if ($ftype == TType::STRUCT) { |
| 1225 | + $this->column_parent = new cassandra_ColumnParent(); |
| 1226 | + $xfer += $this->column_parent->read($input); |
| 1227 | + } else { |
| 1228 | + $xfer += $input->skip($ftype); |
| 1229 | + } |
| 1230 | + break; |
| 1231 | + case 4: |
| 1232 | + if ($ftype == TType::STRUCT) { |
| 1233 | + $this->predicate = new cassandra_SlicePredicate(); |
| 1234 | + $xfer += $this->predicate->read($input); |
| 1235 | + } else { |
| 1236 | + $xfer += $input->skip($ftype); |
| 1237 | + } |
| 1238 | + break; |
| 1239 | + case 5: |
| 1240 | + if ($ftype == TType::I32) { |
| 1241 | + $xfer += $input->readI32($this->consistency_level); |
| 1242 | + } else { |
| 1243 | + $xfer += $input->skip($ftype); |
| 1244 | + } |
| 1245 | + break; |
| 1246 | + default: |
| 1247 | + $xfer += $input->skip($ftype); |
| 1248 | + break; |
| 1249 | + } |
| 1250 | + $xfer += $input->readFieldEnd(); |
| 1251 | + } |
| 1252 | + $xfer += $input->readStructEnd(); |
| 1253 | + return $xfer; |
| 1254 | + } |
| 1255 | + |
| 1256 | + public function write($output) { |
| 1257 | + $xfer = 0; |
| 1258 | + $xfer += $output->writeStructBegin('Cassandra_get_slice_args'); |
| 1259 | + if ($this->keyspace !== null) { |
| 1260 | + $xfer += $output->writeFieldBegin('keyspace', TType::STRING, 1); |
| 1261 | + $xfer += $output->writeString($this->keyspace); |
| 1262 | + $xfer += $output->writeFieldEnd(); |
| 1263 | + } |
| 1264 | + if ($this->key !== null) { |
| 1265 | + $xfer += $output->writeFieldBegin('key', TType::STRING, 2); |
| 1266 | + $xfer += $output->writeString($this->key); |
| 1267 | + $xfer += $output->writeFieldEnd(); |
| 1268 | + } |
| 1269 | + if ($this->column_parent !== null) { |
| 1270 | + if (!is_object($this->column_parent)) { |
| 1271 | + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); |
| 1272 | + } |
| 1273 | + $xfer += $output->writeFieldBegin('column_parent', TType::STRUCT, 3); |
| 1274 | + $xfer += $this->column_parent->write($output); |
| 1275 | + $xfer += $output->writeFieldEnd(); |
| 1276 | + } |
| 1277 | + if ($this->predicate !== null) { |
| 1278 | + if (!is_object($this->predicate)) { |
| 1279 | + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); |
| 1280 | + } |
| 1281 | + $xfer += $output->writeFieldBegin('predicate', TType::STRUCT, 4); |
| 1282 | + $xfer += $this->predicate->write($output); |
| 1283 | + $xfer += $output->writeFieldEnd(); |
| 1284 | + } |
| 1285 | + if ($this->consistency_level !== null) { |
| 1286 | + $xfer += $output->writeFieldBegin('consistency_level', TType::I32, 5); |
| 1287 | + $xfer += $output->writeI32($this->consistency_level); |
| 1288 | + $xfer += $output->writeFieldEnd(); |
| 1289 | + } |
| 1290 | + $xfer += $output->writeFieldStop(); |
| 1291 | + $xfer += $output->writeStructEnd(); |
| 1292 | + return $xfer; |
| 1293 | + } |
| 1294 | + |
| 1295 | +} |
| 1296 | + |
| 1297 | +class cassandra_Cassandra_get_slice_result { |
| 1298 | + static $_TSPEC; |
| 1299 | + |
| 1300 | + public $success = null; |
| 1301 | + public $ire = null; |
| 1302 | + public $ue = null; |
| 1303 | + public $te = null; |
| 1304 | + |
| 1305 | + public function __construct($vals=null) { |
| 1306 | + if (!isset(self::$_TSPEC)) { |
| 1307 | + self::$_TSPEC = array( |
| 1308 | + 0 => array( |
| 1309 | + 'var' => 'success', |
| 1310 | + 'type' => TType::LST, |
| 1311 | + 'etype' => TType::STRUCT, |
| 1312 | + 'elem' => array( |
| 1313 | + 'type' => TType::STRUCT, |
| 1314 | + 'class' => 'cassandra_ColumnOrSuperColumn', |
| 1315 | + ), |
| 1316 | + ), |
| 1317 | + 1 => array( |
| 1318 | + 'var' => 'ire', |
| 1319 | + 'type' => TType::STRUCT, |
| 1320 | + 'class' => 'cassandra_InvalidRequestException', |
| 1321 | + ), |
| 1322 | + 2 => array( |
| 1323 | + 'var' => 'ue', |
| 1324 | + 'type' => TType::STRUCT, |
| 1325 | + 'class' => 'cassandra_UnavailableException', |
| 1326 | + ), |
| 1327 | + 3 => array( |
| 1328 | + 'var' => 'te', |
| 1329 | + 'type' => TType::STRUCT, |
| 1330 | + 'class' => 'cassandra_TimedOutException', |
| 1331 | + ), |
| 1332 | + ); |
| 1333 | + } |
| 1334 | + if (is_array($vals)) { |
| 1335 | + if (isset($vals['success'])) { |
| 1336 | + $this->success = $vals['success']; |
| 1337 | + } |
| 1338 | + if (isset($vals['ire'])) { |
| 1339 | + $this->ire = $vals['ire']; |
| 1340 | + } |
| 1341 | + if (isset($vals['ue'])) { |
| 1342 | + $this->ue = $vals['ue']; |
| 1343 | + } |
| 1344 | + if (isset($vals['te'])) { |
| 1345 | + $this->te = $vals['te']; |
| 1346 | + } |
| 1347 | + } |
| 1348 | + } |
| 1349 | + |
| 1350 | + public function getName() { |
| 1351 | + return 'Cassandra_get_slice_result'; |
| 1352 | + } |
| 1353 | + |
| 1354 | + public function read($input) |
| 1355 | + { |
| 1356 | + $xfer = 0; |
| 1357 | + $fname = null; |
| 1358 | + $ftype = 0; |
| 1359 | + $fid = 0; |
| 1360 | + $xfer += $input->readStructBegin($fname); |
| 1361 | + while (true) |
| 1362 | + { |
| 1363 | + $xfer += $input->readFieldBegin($fname, $ftype, $fid); |
| 1364 | + if ($ftype == TType::STOP) { |
| 1365 | + break; |
| 1366 | + } |
| 1367 | + switch ($fid) |
| 1368 | + { |
| 1369 | + case 0: |
| 1370 | + if ($ftype == TType::LST) { |
| 1371 | + $this->success = array(); |
| 1372 | + $_size21 = 0; |
| 1373 | + $_etype24 = 0; |
| 1374 | + $xfer += $input->readListBegin($_etype24, $_size21); |
| 1375 | + for ($_i25 = 0; $_i25 < $_size21; ++$_i25) |
| 1376 | + { |
| 1377 | + $elem26 = null; |
| 1378 | + $elem26 = new cassandra_ColumnOrSuperColumn(); |
| 1379 | + $xfer += $elem26->read($input); |
| 1380 | + $this->success []= $elem26; |
| 1381 | + } |
| 1382 | + $xfer += $input->readListEnd(); |
| 1383 | + } else { |
| 1384 | + $xfer += $input->skip($ftype); |
| 1385 | + } |
| 1386 | + break; |
| 1387 | + case 1: |
| 1388 | + if ($ftype == TType::STRUCT) { |
| 1389 | + $this->ire = new cassandra_InvalidRequestException(); |
| 1390 | + $xfer += $this->ire->read($input); |
| 1391 | + } else { |
| 1392 | + $xfer += $input->skip($ftype); |
| 1393 | + } |
| 1394 | + break; |
| 1395 | + case 2: |
| 1396 | + if ($ftype == TType::STRUCT) { |
| 1397 | + $this->ue = new cassandra_UnavailableException(); |
| 1398 | + $xfer += $this->ue->read($input); |
| 1399 | + } else { |
| 1400 | + $xfer += $input->skip($ftype); |
| 1401 | + } |
| 1402 | + break; |
| 1403 | + case 3: |
| 1404 | + if ($ftype == TType::STRUCT) { |
| 1405 | + $this->te = new cassandra_TimedOutException(); |
| 1406 | + $xfer += $this->te->read($input); |
| 1407 | + } else { |
| 1408 | + $xfer += $input->skip($ftype); |
| 1409 | + } |
| 1410 | + break; |
| 1411 | + default: |
| 1412 | + $xfer += $input->skip($ftype); |
| 1413 | + break; |
| 1414 | + } |
| 1415 | + $xfer += $input->readFieldEnd(); |
| 1416 | + } |
| 1417 | + $xfer += $input->readStructEnd(); |
| 1418 | + return $xfer; |
| 1419 | + } |
| 1420 | + |
| 1421 | + public function write($output) { |
| 1422 | + $xfer = 0; |
| 1423 | + $xfer += $output->writeStructBegin('Cassandra_get_slice_result'); |
| 1424 | + if ($this->success !== null) { |
| 1425 | + if (!is_array($this->success)) { |
| 1426 | + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); |
| 1427 | + } |
| 1428 | + $xfer += $output->writeFieldBegin('success', TType::LST, 0); |
| 1429 | + { |
| 1430 | + $output->writeListBegin(TType::STRUCT, count($this->success)); |
| 1431 | + { |
| 1432 | + foreach ($this->success as $iter27) |
| 1433 | + { |
| 1434 | + $xfer += $iter27->write($output); |
| 1435 | + } |
| 1436 | + } |
| 1437 | + $output->writeListEnd(); |
| 1438 | + } |
| 1439 | + $xfer += $output->writeFieldEnd(); |
| 1440 | + } |
| 1441 | + if ($this->ire !== null) { |
| 1442 | + $xfer += $output->writeFieldBegin('ire', TType::STRUCT, 1); |
| 1443 | + $xfer += $this->ire->write($output); |
| 1444 | + $xfer += $output->writeFieldEnd(); |
| 1445 | + } |
| 1446 | + if ($this->ue !== null) { |
| 1447 | + $xfer += $output->writeFieldBegin('ue', TType::STRUCT, 2); |
| 1448 | + $xfer += $this->ue->write($output); |
| 1449 | + $xfer += $output->writeFieldEnd(); |
| 1450 | + } |
| 1451 | + if ($this->te !== null) { |
| 1452 | + $xfer += $output->writeFieldBegin('te', TType::STRUCT, 3); |
| 1453 | + $xfer += $this->te->write($output); |
| 1454 | + $xfer += $output->writeFieldEnd(); |
| 1455 | + } |
| 1456 | + $xfer += $output->writeFieldStop(); |
| 1457 | + $xfer += $output->writeStructEnd(); |
| 1458 | + return $xfer; |
| 1459 | + } |
| 1460 | + |
| 1461 | +} |
| 1462 | + |
| 1463 | +class cassandra_Cassandra_multiget_args { |
| 1464 | + static $_TSPEC; |
| 1465 | + |
| 1466 | + public $keyspace = null; |
| 1467 | + public $keys = null; |
| 1468 | + public $column_path = null; |
| 1469 | + public $consistency_level = 1; |
| 1470 | + |
| 1471 | + public function __construct($vals=null) { |
| 1472 | + if (!isset(self::$_TSPEC)) { |
| 1473 | + self::$_TSPEC = array( |
| 1474 | + 1 => array( |
| 1475 | + 'var' => 'keyspace', |
| 1476 | + 'type' => TType::STRING, |
| 1477 | + ), |
| 1478 | + 2 => array( |
| 1479 | + 'var' => 'keys', |
| 1480 | + 'type' => TType::LST, |
| 1481 | + 'etype' => TType::STRING, |
| 1482 | + 'elem' => array( |
| 1483 | + 'type' => TType::STRING, |
| 1484 | + ), |
| 1485 | + ), |
| 1486 | + 3 => array( |
| 1487 | + 'var' => 'column_path', |
| 1488 | + 'type' => TType::STRUCT, |
| 1489 | + 'class' => 'cassandra_ColumnPath', |
| 1490 | + ), |
| 1491 | + 4 => array( |
| 1492 | + 'var' => 'consistency_level', |
| 1493 | + 'type' => TType::I32, |
| 1494 | + ), |
| 1495 | + ); |
| 1496 | + } |
| 1497 | + if (is_array($vals)) { |
| 1498 | + if (isset($vals['keyspace'])) { |
| 1499 | + $this->keyspace = $vals['keyspace']; |
| 1500 | + } |
| 1501 | + if (isset($vals['keys'])) { |
| 1502 | + $this->keys = $vals['keys']; |
| 1503 | + } |
| 1504 | + if (isset($vals['column_path'])) { |
| 1505 | + $this->column_path = $vals['column_path']; |
| 1506 | + } |
| 1507 | + if (isset($vals['consistency_level'])) { |
| 1508 | + $this->consistency_level = $vals['consistency_level']; |
| 1509 | + } |
| 1510 | + } |
| 1511 | + } |
| 1512 | + |
| 1513 | + public function getName() { |
| 1514 | + return 'Cassandra_multiget_args'; |
| 1515 | + } |
| 1516 | + |
| 1517 | + public function read($input) |
| 1518 | + { |
| 1519 | + $xfer = 0; |
| 1520 | + $fname = null; |
| 1521 | + $ftype = 0; |
| 1522 | + $fid = 0; |
| 1523 | + $xfer += $input->readStructBegin($fname); |
| 1524 | + while (true) |
| 1525 | + { |
| 1526 | + $xfer += $input->readFieldBegin($fname, $ftype, $fid); |
| 1527 | + if ($ftype == TType::STOP) { |
| 1528 | + break; |
| 1529 | + } |
| 1530 | + switch ($fid) |
| 1531 | + { |
| 1532 | + case 1: |
| 1533 | + if ($ftype == TType::STRING) { |
| 1534 | + $xfer += $input->readString($this->keyspace); |
| 1535 | + } else { |
| 1536 | + $xfer += $input->skip($ftype); |
| 1537 | + } |
| 1538 | + break; |
| 1539 | + case 2: |
| 1540 | + if ($ftype == TType::LST) { |
| 1541 | + $this->keys = array(); |
| 1542 | + $_size28 = 0; |
| 1543 | + $_etype31 = 0; |
| 1544 | + $xfer += $input->readListBegin($_etype31, $_size28); |
| 1545 | + for ($_i32 = 0; $_i32 < $_size28; ++$_i32) |
| 1546 | + { |
| 1547 | + $elem33 = null; |
| 1548 | + $xfer += $input->readString($elem33); |
| 1549 | + $this->keys []= $elem33; |
| 1550 | + } |
| 1551 | + $xfer += $input->readListEnd(); |
| 1552 | + } else { |
| 1553 | + $xfer += $input->skip($ftype); |
| 1554 | + } |
| 1555 | + break; |
| 1556 | + case 3: |
| 1557 | + if ($ftype == TType::STRUCT) { |
| 1558 | + $this->column_path = new cassandra_ColumnPath(); |
| 1559 | + $xfer += $this->column_path->read($input); |
| 1560 | + } else { |
| 1561 | + $xfer += $input->skip($ftype); |
| 1562 | + } |
| 1563 | + break; |
| 1564 | + case 4: |
| 1565 | + if ($ftype == TType::I32) { |
| 1566 | + $xfer += $input->readI32($this->consistency_level); |
| 1567 | + } else { |
| 1568 | + $xfer += $input->skip($ftype); |
| 1569 | + } |
| 1570 | + break; |
| 1571 | + default: |
| 1572 | + $xfer += $input->skip($ftype); |
| 1573 | + break; |
| 1574 | + } |
| 1575 | + $xfer += $input->readFieldEnd(); |
| 1576 | + } |
| 1577 | + $xfer += $input->readStructEnd(); |
| 1578 | + return $xfer; |
| 1579 | + } |
| 1580 | + |
| 1581 | + public function write($output) { |
| 1582 | + $xfer = 0; |
| 1583 | + $xfer += $output->writeStructBegin('Cassandra_multiget_args'); |
| 1584 | + if ($this->keyspace !== null) { |
| 1585 | + $xfer += $output->writeFieldBegin('keyspace', TType::STRING, 1); |
| 1586 | + $xfer += $output->writeString($this->keyspace); |
| 1587 | + $xfer += $output->writeFieldEnd(); |
| 1588 | + } |
| 1589 | + if ($this->keys !== null) { |
| 1590 | + if (!is_array($this->keys)) { |
| 1591 | + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); |
| 1592 | + } |
| 1593 | + $xfer += $output->writeFieldBegin('keys', TType::LST, 2); |
| 1594 | + { |
| 1595 | + $output->writeListBegin(TType::STRING, count($this->keys)); |
| 1596 | + { |
| 1597 | + foreach ($this->keys as $iter34) |
| 1598 | + { |
| 1599 | + $xfer += $output->writeString($iter34); |
| 1600 | + } |
| 1601 | + } |
| 1602 | + $output->writeListEnd(); |
| 1603 | + } |
| 1604 | + $xfer += $output->writeFieldEnd(); |
| 1605 | + } |
| 1606 | + if ($this->column_path !== null) { |
| 1607 | + if (!is_object($this->column_path)) { |
| 1608 | + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); |
| 1609 | + } |
| 1610 | + $xfer += $output->writeFieldBegin('column_path', TType::STRUCT, 3); |
| 1611 | + $xfer += $this->column_path->write($output); |
| 1612 | + $xfer += $output->writeFieldEnd(); |
| 1613 | + } |
| 1614 | + if ($this->consistency_level !== null) { |
| 1615 | + $xfer += $output->writeFieldBegin('consistency_level', TType::I32, 4); |
| 1616 | + $xfer += $output->writeI32($this->consistency_level); |
| 1617 | + $xfer += $output->writeFieldEnd(); |
| 1618 | + } |
| 1619 | + $xfer += $output->writeFieldStop(); |
| 1620 | + $xfer += $output->writeStructEnd(); |
| 1621 | + return $xfer; |
| 1622 | + } |
| 1623 | + |
| 1624 | +} |
| 1625 | + |
| 1626 | +class cassandra_Cassandra_multiget_result { |
| 1627 | + static $_TSPEC; |
| 1628 | + |
| 1629 | + public $success = null; |
| 1630 | + public $ire = null; |
| 1631 | + public $ue = null; |
| 1632 | + public $te = null; |
| 1633 | + |
| 1634 | + public function __construct($vals=null) { |
| 1635 | + if (!isset(self::$_TSPEC)) { |
| 1636 | + self::$_TSPEC = array( |
| 1637 | + 0 => array( |
| 1638 | + 'var' => 'success', |
| 1639 | + 'type' => TType::MAP, |
| 1640 | + 'ktype' => TType::STRING, |
| 1641 | + 'vtype' => TType::STRUCT, |
| 1642 | + 'key' => array( |
| 1643 | + 'type' => TType::STRING, |
| 1644 | + ), |
| 1645 | + 'val' => array( |
| 1646 | + 'type' => TType::STRUCT, |
| 1647 | + 'class' => 'cassandra_ColumnOrSuperColumn', |
| 1648 | + ), |
| 1649 | + ), |
| 1650 | + 1 => array( |
| 1651 | + 'var' => 'ire', |
| 1652 | + 'type' => TType::STRUCT, |
| 1653 | + 'class' => 'cassandra_InvalidRequestException', |
| 1654 | + ), |
| 1655 | + 2 => array( |
| 1656 | + 'var' => 'ue', |
| 1657 | + 'type' => TType::STRUCT, |
| 1658 | + 'class' => 'cassandra_UnavailableException', |
| 1659 | + ), |
| 1660 | + 3 => array( |
| 1661 | + 'var' => 'te', |
| 1662 | + 'type' => TType::STRUCT, |
| 1663 | + 'class' => 'cassandra_TimedOutException', |
| 1664 | + ), |
| 1665 | + ); |
| 1666 | + } |
| 1667 | + if (is_array($vals)) { |
| 1668 | + if (isset($vals['success'])) { |
| 1669 | + $this->success = $vals['success']; |
| 1670 | + } |
| 1671 | + if (isset($vals['ire'])) { |
| 1672 | + $this->ire = $vals['ire']; |
| 1673 | + } |
| 1674 | + if (isset($vals['ue'])) { |
| 1675 | + $this->ue = $vals['ue']; |
| 1676 | + } |
| 1677 | + if (isset($vals['te'])) { |
| 1678 | + $this->te = $vals['te']; |
| 1679 | + } |
| 1680 | + } |
| 1681 | + } |
| 1682 | + |
| 1683 | + public function getName() { |
| 1684 | + return 'Cassandra_multiget_result'; |
| 1685 | + } |
| 1686 | + |
| 1687 | + public function read($input) |
| 1688 | + { |
| 1689 | + $xfer = 0; |
| 1690 | + $fname = null; |
| 1691 | + $ftype = 0; |
| 1692 | + $fid = 0; |
| 1693 | + $xfer += $input->readStructBegin($fname); |
| 1694 | + while (true) |
| 1695 | + { |
| 1696 | + $xfer += $input->readFieldBegin($fname, $ftype, $fid); |
| 1697 | + if ($ftype == TType::STOP) { |
| 1698 | + break; |
| 1699 | + } |
| 1700 | + switch ($fid) |
| 1701 | + { |
| 1702 | + case 0: |
| 1703 | + if ($ftype == TType::MAP) { |
| 1704 | + $this->success = array(); |
| 1705 | + $_size35 = 0; |
| 1706 | + $_ktype36 = 0; |
| 1707 | + $_vtype37 = 0; |
| 1708 | + $xfer += $input->readMapBegin($_ktype36, $_vtype37, $_size35); |
| 1709 | + for ($_i39 = 0; $_i39 < $_size35; ++$_i39) |
| 1710 | + { |
| 1711 | + $key40 = ''; |
| 1712 | + $val41 = new cassandra_ColumnOrSuperColumn(); |
| 1713 | + $xfer += $input->readString($key40); |
| 1714 | + $val41 = new cassandra_ColumnOrSuperColumn(); |
| 1715 | + $xfer += $val41->read($input); |
| 1716 | + $this->success[$key40] = $val41; |
| 1717 | + } |
| 1718 | + $xfer += $input->readMapEnd(); |
| 1719 | + } else { |
| 1720 | + $xfer += $input->skip($ftype); |
| 1721 | + } |
| 1722 | + break; |
| 1723 | + case 1: |
| 1724 | + if ($ftype == TType::STRUCT) { |
| 1725 | + $this->ire = new cassandra_InvalidRequestException(); |
| 1726 | + $xfer += $this->ire->read($input); |
| 1727 | + } else { |
| 1728 | + $xfer += $input->skip($ftype); |
| 1729 | + } |
| 1730 | + break; |
| 1731 | + case 2: |
| 1732 | + if ($ftype == TType::STRUCT) { |
| 1733 | + $this->ue = new cassandra_UnavailableException(); |
| 1734 | + $xfer += $this->ue->read($input); |
| 1735 | + } else { |
| 1736 | + $xfer += $input->skip($ftype); |
| 1737 | + } |
| 1738 | + break; |
| 1739 | + case 3: |
| 1740 | + if ($ftype == TType::STRUCT) { |
| 1741 | + $this->te = new cassandra_TimedOutException(); |
| 1742 | + $xfer += $this->te->read($input); |
| 1743 | + } else { |
| 1744 | + $xfer += $input->skip($ftype); |
| 1745 | + } |
| 1746 | + break; |
| 1747 | + default: |
| 1748 | + $xfer += $input->skip($ftype); |
| 1749 | + break; |
| 1750 | + } |
| 1751 | + $xfer += $input->readFieldEnd(); |
| 1752 | + } |
| 1753 | + $xfer += $input->readStructEnd(); |
| 1754 | + return $xfer; |
| 1755 | + } |
| 1756 | + |
| 1757 | + public function write($output) { |
| 1758 | + $xfer = 0; |
| 1759 | + $xfer += $output->writeStructBegin('Cassandra_multiget_result'); |
| 1760 | + if ($this->success !== null) { |
| 1761 | + if (!is_array($this->success)) { |
| 1762 | + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); |
| 1763 | + } |
| 1764 | + $xfer += $output->writeFieldBegin('success', TType::MAP, 0); |
| 1765 | + { |
| 1766 | + $output->writeMapBegin(TType::STRING, TType::STRUCT, count($this->success)); |
| 1767 | + { |
| 1768 | + foreach ($this->success as $kiter42 => $viter43) |
| 1769 | + { |
| 1770 | + $xfer += $output->writeString($kiter42); |
| 1771 | + $xfer += $viter43->write($output); |
| 1772 | + } |
| 1773 | + } |
| 1774 | + $output->writeMapEnd(); |
| 1775 | + } |
| 1776 | + $xfer += $output->writeFieldEnd(); |
| 1777 | + } |
| 1778 | + if ($this->ire !== null) { |
| 1779 | + $xfer += $output->writeFieldBegin('ire', TType::STRUCT, 1); |
| 1780 | + $xfer += $this->ire->write($output); |
| 1781 | + $xfer += $output->writeFieldEnd(); |
| 1782 | + } |
| 1783 | + if ($this->ue !== null) { |
| 1784 | + $xfer += $output->writeFieldBegin('ue', TType::STRUCT, 2); |
| 1785 | + $xfer += $this->ue->write($output); |
| 1786 | + $xfer += $output->writeFieldEnd(); |
| 1787 | + } |
| 1788 | + if ($this->te !== null) { |
| 1789 | + $xfer += $output->writeFieldBegin('te', TType::STRUCT, 3); |
| 1790 | + $xfer += $this->te->write($output); |
| 1791 | + $xfer += $output->writeFieldEnd(); |
| 1792 | + } |
| 1793 | + $xfer += $output->writeFieldStop(); |
| 1794 | + $xfer += $output->writeStructEnd(); |
| 1795 | + return $xfer; |
| 1796 | + } |
| 1797 | + |
| 1798 | +} |
| 1799 | + |
| 1800 | +class cassandra_Cassandra_multiget_slice_args { |
| 1801 | + static $_TSPEC; |
| 1802 | + |
| 1803 | + public $keyspace = null; |
| 1804 | + public $keys = null; |
| 1805 | + public $column_parent = null; |
| 1806 | + public $predicate = null; |
| 1807 | + public $consistency_level = 1; |
| 1808 | + |
| 1809 | + public function __construct($vals=null) { |
| 1810 | + if (!isset(self::$_TSPEC)) { |
| 1811 | + self::$_TSPEC = array( |
| 1812 | + 1 => array( |
| 1813 | + 'var' => 'keyspace', |
| 1814 | + 'type' => TType::STRING, |
| 1815 | + ), |
| 1816 | + 2 => array( |
| 1817 | + 'var' => 'keys', |
| 1818 | + 'type' => TType::LST, |
| 1819 | + 'etype' => TType::STRING, |
| 1820 | + 'elem' => array( |
| 1821 | + 'type' => TType::STRING, |
| 1822 | + ), |
| 1823 | + ), |
| 1824 | + 3 => array( |
| 1825 | + 'var' => 'column_parent', |
| 1826 | + 'type' => TType::STRUCT, |
| 1827 | + 'class' => 'cassandra_ColumnParent', |
| 1828 | + ), |
| 1829 | + 4 => array( |
| 1830 | + 'var' => 'predicate', |
| 1831 | + 'type' => TType::STRUCT, |
| 1832 | + 'class' => 'cassandra_SlicePredicate', |
| 1833 | + ), |
| 1834 | + 5 => array( |
| 1835 | + 'var' => 'consistency_level', |
| 1836 | + 'type' => TType::I32, |
| 1837 | + ), |
| 1838 | + ); |
| 1839 | + } |
| 1840 | + if (is_array($vals)) { |
| 1841 | + if (isset($vals['keyspace'])) { |
| 1842 | + $this->keyspace = $vals['keyspace']; |
| 1843 | + } |
| 1844 | + if (isset($vals['keys'])) { |
| 1845 | + $this->keys = $vals['keys']; |
| 1846 | + } |
| 1847 | + if (isset($vals['column_parent'])) { |
| 1848 | + $this->column_parent = $vals['column_parent']; |
| 1849 | + } |
| 1850 | + if (isset($vals['predicate'])) { |
| 1851 | + $this->predicate = $vals['predicate']; |
| 1852 | + } |
| 1853 | + if (isset($vals['consistency_level'])) { |
| 1854 | + $this->consistency_level = $vals['consistency_level']; |
| 1855 | + } |
| 1856 | + } |
| 1857 | + } |
| 1858 | + |
| 1859 | + public function getName() { |
| 1860 | + return 'Cassandra_multiget_slice_args'; |
| 1861 | + } |
| 1862 | + |
| 1863 | + public function read($input) |
| 1864 | + { |
| 1865 | + $xfer = 0; |
| 1866 | + $fname = null; |
| 1867 | + $ftype = 0; |
| 1868 | + $fid = 0; |
| 1869 | + $xfer += $input->readStructBegin($fname); |
| 1870 | + while (true) |
| 1871 | + { |
| 1872 | + $xfer += $input->readFieldBegin($fname, $ftype, $fid); |
| 1873 | + if ($ftype == TType::STOP) { |
| 1874 | + break; |
| 1875 | + } |
| 1876 | + switch ($fid) |
| 1877 | + { |
| 1878 | + case 1: |
| 1879 | + if ($ftype == TType::STRING) { |
| 1880 | + $xfer += $input->readString($this->keyspace); |
| 1881 | + } else { |
| 1882 | + $xfer += $input->skip($ftype); |
| 1883 | + } |
| 1884 | + break; |
| 1885 | + case 2: |
| 1886 | + if ($ftype == TType::LST) { |
| 1887 | + $this->keys = array(); |
| 1888 | + $_size44 = 0; |
| 1889 | + $_etype47 = 0; |
| 1890 | + $xfer += $input->readListBegin($_etype47, $_size44); |
| 1891 | + for ($_i48 = 0; $_i48 < $_size44; ++$_i48) |
| 1892 | + { |
| 1893 | + $elem49 = null; |
| 1894 | + $xfer += $input->readString($elem49); |
| 1895 | + $this->keys []= $elem49; |
| 1896 | + } |
| 1897 | + $xfer += $input->readListEnd(); |
| 1898 | + } else { |
| 1899 | + $xfer += $input->skip($ftype); |
| 1900 | + } |
| 1901 | + break; |
| 1902 | + case 3: |
| 1903 | + if ($ftype == TType::STRUCT) { |
| 1904 | + $this->column_parent = new cassandra_ColumnParent(); |
| 1905 | + $xfer += $this->column_parent->read($input); |
| 1906 | + } else { |
| 1907 | + $xfer += $input->skip($ftype); |
| 1908 | + } |
| 1909 | + break; |
| 1910 | + case 4: |
| 1911 | + if ($ftype == TType::STRUCT) { |
| 1912 | + $this->predicate = new cassandra_SlicePredicate(); |
| 1913 | + $xfer += $this->predicate->read($input); |
| 1914 | + } else { |
| 1915 | + $xfer += $input->skip($ftype); |
| 1916 | + } |
| 1917 | + break; |
| 1918 | + case 5: |
| 1919 | + if ($ftype == TType::I32) { |
| 1920 | + $xfer += $input->readI32($this->consistency_level); |
| 1921 | + } else { |
| 1922 | + $xfer += $input->skip($ftype); |
| 1923 | + } |
| 1924 | + break; |
| 1925 | + default: |
| 1926 | + $xfer += $input->skip($ftype); |
| 1927 | + break; |
| 1928 | + } |
| 1929 | + $xfer += $input->readFieldEnd(); |
| 1930 | + } |
| 1931 | + $xfer += $input->readStructEnd(); |
| 1932 | + return $xfer; |
| 1933 | + } |
| 1934 | + |
| 1935 | + public function write($output) { |
| 1936 | + $xfer = 0; |
| 1937 | + $xfer += $output->writeStructBegin('Cassandra_multiget_slice_args'); |
| 1938 | + if ($this->keyspace !== null) { |
| 1939 | + $xfer += $output->writeFieldBegin('keyspace', TType::STRING, 1); |
| 1940 | + $xfer += $output->writeString($this->keyspace); |
| 1941 | + $xfer += $output->writeFieldEnd(); |
| 1942 | + } |
| 1943 | + if ($this->keys !== null) { |
| 1944 | + if (!is_array($this->keys)) { |
| 1945 | + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); |
| 1946 | + } |
| 1947 | + $xfer += $output->writeFieldBegin('keys', TType::LST, 2); |
| 1948 | + { |
| 1949 | + $output->writeListBegin(TType::STRING, count($this->keys)); |
| 1950 | + { |
| 1951 | + foreach ($this->keys as $iter50) |
| 1952 | + { |
| 1953 | + $xfer += $output->writeString($iter50); |
| 1954 | + } |
| 1955 | + } |
| 1956 | + $output->writeListEnd(); |
| 1957 | + } |
| 1958 | + $xfer += $output->writeFieldEnd(); |
| 1959 | + } |
| 1960 | + if ($this->column_parent !== null) { |
| 1961 | + if (!is_object($this->column_parent)) { |
| 1962 | + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); |
| 1963 | + } |
| 1964 | + $xfer += $output->writeFieldBegin('column_parent', TType::STRUCT, 3); |
| 1965 | + $xfer += $this->column_parent->write($output); |
| 1966 | + $xfer += $output->writeFieldEnd(); |
| 1967 | + } |
| 1968 | + if ($this->predicate !== null) { |
| 1969 | + if (!is_object($this->predicate)) { |
| 1970 | + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); |
| 1971 | + } |
| 1972 | + $xfer += $output->writeFieldBegin('predicate', TType::STRUCT, 4); |
| 1973 | + $xfer += $this->predicate->write($output); |
| 1974 | + $xfer += $output->writeFieldEnd(); |
| 1975 | + } |
| 1976 | + if ($this->consistency_level !== null) { |
| 1977 | + $xfer += $output->writeFieldBegin('consistency_level', TType::I32, 5); |
| 1978 | + $xfer += $output->writeI32($this->consistency_level); |
| 1979 | + $xfer += $output->writeFieldEnd(); |
| 1980 | + } |
| 1981 | + $xfer += $output->writeFieldStop(); |
| 1982 | + $xfer += $output->writeStructEnd(); |
| 1983 | + return $xfer; |
| 1984 | + } |
| 1985 | + |
| 1986 | +} |
| 1987 | + |
| 1988 | +class cassandra_Cassandra_multiget_slice_result { |
| 1989 | + static $_TSPEC; |
| 1990 | + |
| 1991 | + public $success = null; |
| 1992 | + public $ire = null; |
| 1993 | + public $ue = null; |
| 1994 | + public $te = null; |
| 1995 | + |
| 1996 | + public function __construct($vals=null) { |
| 1997 | + if (!isset(self::$_TSPEC)) { |
| 1998 | + self::$_TSPEC = array( |
| 1999 | + 0 => array( |
| 2000 | + 'var' => 'success', |
| 2001 | + 'type' => TType::MAP, |
| 2002 | + 'ktype' => TType::STRING, |
| 2003 | + 'vtype' => TType::LST, |
| 2004 | + 'key' => array( |
| 2005 | + 'type' => TType::STRING, |
| 2006 | + ), |
| 2007 | + 'val' => array( |
| 2008 | + 'type' => TType::LST, |
| 2009 | + 'etype' => TType::STRUCT, |
| 2010 | + 'elem' => array( |
| 2011 | + 'type' => TType::STRUCT, |
| 2012 | + 'class' => 'cassandra_ColumnOrSuperColumn', |
| 2013 | + ), |
| 2014 | + ), |
| 2015 | + ), |
| 2016 | + 1 => array( |
| 2017 | + 'var' => 'ire', |
| 2018 | + 'type' => TType::STRUCT, |
| 2019 | + 'class' => 'cassandra_InvalidRequestException', |
| 2020 | + ), |
| 2021 | + 2 => array( |
| 2022 | + 'var' => 'ue', |
| 2023 | + 'type' => TType::STRUCT, |
| 2024 | + 'class' => 'cassandra_UnavailableException', |
| 2025 | + ), |
| 2026 | + 3 => array( |
| 2027 | + 'var' => 'te', |
| 2028 | + 'type' => TType::STRUCT, |
| 2029 | + 'class' => 'cassandra_TimedOutException', |
| 2030 | + ), |
| 2031 | + ); |
| 2032 | + } |
| 2033 | + if (is_array($vals)) { |
| 2034 | + if (isset($vals['success'])) { |
| 2035 | + $this->success = $vals['success']; |
| 2036 | + } |
| 2037 | + if (isset($vals['ire'])) { |
| 2038 | + $this->ire = $vals['ire']; |
| 2039 | + } |
| 2040 | + if (isset($vals['ue'])) { |
| 2041 | + $this->ue = $vals['ue']; |
| 2042 | + } |
| 2043 | + if (isset($vals['te'])) { |
| 2044 | + $this->te = $vals['te']; |
| 2045 | + } |
| 2046 | + } |
| 2047 | + } |
| 2048 | + |
| 2049 | + public function getName() { |
| 2050 | + return 'Cassandra_multiget_slice_result'; |
| 2051 | + } |
| 2052 | + |
| 2053 | + public function read($input) |
| 2054 | + { |
| 2055 | + $xfer = 0; |
| 2056 | + $fname = null; |
| 2057 | + $ftype = 0; |
| 2058 | + $fid = 0; |
| 2059 | + $xfer += $input->readStructBegin($fname); |
| 2060 | + while (true) |
| 2061 | + { |
| 2062 | + $xfer += $input->readFieldBegin($fname, $ftype, $fid); |
| 2063 | + if ($ftype == TType::STOP) { |
| 2064 | + break; |
| 2065 | + } |
| 2066 | + switch ($fid) |
| 2067 | + { |
| 2068 | + case 0: |
| 2069 | + if ($ftype == TType::MAP) { |
| 2070 | + $this->success = array(); |
| 2071 | + $_size51 = 0; |
| 2072 | + $_ktype52 = 0; |
| 2073 | + $_vtype53 = 0; |
| 2074 | + $xfer += $input->readMapBegin($_ktype52, $_vtype53, $_size51); |
| 2075 | + for ($_i55 = 0; $_i55 < $_size51; ++$_i55) |
| 2076 | + { |
| 2077 | + $key56 = ''; |
| 2078 | + $val57 = array(); |
| 2079 | + $xfer += $input->readString($key56); |
| 2080 | + $val57 = array(); |
| 2081 | + $_size58 = 0; |
| 2082 | + $_etype61 = 0; |
| 2083 | + $xfer += $input->readListBegin($_etype61, $_size58); |
| 2084 | + for ($_i62 = 0; $_i62 < $_size58; ++$_i62) |
| 2085 | + { |
| 2086 | + $elem63 = null; |
| 2087 | + $elem63 = new cassandra_ColumnOrSuperColumn(); |
| 2088 | + $xfer += $elem63->read($input); |
| 2089 | + $val57 []= $elem63; |
| 2090 | + } |
| 2091 | + $xfer += $input->readListEnd(); |
| 2092 | + $this->success[$key56] = $val57; |
| 2093 | + } |
| 2094 | + $xfer += $input->readMapEnd(); |
| 2095 | + } else { |
| 2096 | + $xfer += $input->skip($ftype); |
| 2097 | + } |
| 2098 | + break; |
| 2099 | + case 1: |
| 2100 | + if ($ftype == TType::STRUCT) { |
| 2101 | + $this->ire = new cassandra_InvalidRequestException(); |
| 2102 | + $xfer += $this->ire->read($input); |
| 2103 | + } else { |
| 2104 | + $xfer += $input->skip($ftype); |
| 2105 | + } |
| 2106 | + break; |
| 2107 | + case 2: |
| 2108 | + if ($ftype == TType::STRUCT) { |
| 2109 | + $this->ue = new cassandra_UnavailableException(); |
| 2110 | + $xfer += $this->ue->read($input); |
| 2111 | + } else { |
| 2112 | + $xfer += $input->skip($ftype); |
| 2113 | + } |
| 2114 | + break; |
| 2115 | + case 3: |
| 2116 | + if ($ftype == TType::STRUCT) { |
| 2117 | + $this->te = new cassandra_TimedOutException(); |
| 2118 | + $xfer += $this->te->read($input); |
| 2119 | + } else { |
| 2120 | + $xfer += $input->skip($ftype); |
| 2121 | + } |
| 2122 | + break; |
| 2123 | + default: |
| 2124 | + $xfer += $input->skip($ftype); |
| 2125 | + break; |
| 2126 | + } |
| 2127 | + $xfer += $input->readFieldEnd(); |
| 2128 | + } |
| 2129 | + $xfer += $input->readStructEnd(); |
| 2130 | + return $xfer; |
| 2131 | + } |
| 2132 | + |
| 2133 | + public function write($output) { |
| 2134 | + $xfer = 0; |
| 2135 | + $xfer += $output->writeStructBegin('Cassandra_multiget_slice_result'); |
| 2136 | + if ($this->success !== null) { |
| 2137 | + if (!is_array($this->success)) { |
| 2138 | + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); |
| 2139 | + } |
| 2140 | + $xfer += $output->writeFieldBegin('success', TType::MAP, 0); |
| 2141 | + { |
| 2142 | + $output->writeMapBegin(TType::STRING, TType::LST, count($this->success)); |
| 2143 | + { |
| 2144 | + foreach ($this->success as $kiter64 => $viter65) |
| 2145 | + { |
| 2146 | + $xfer += $output->writeString($kiter64); |
| 2147 | + { |
| 2148 | + $output->writeListBegin(TType::STRUCT, count($viter65)); |
| 2149 | + { |
| 2150 | + foreach ($viter65 as $iter66) |
| 2151 | + { |
| 2152 | + $xfer += $iter66->write($output); |
| 2153 | + } |
| 2154 | + } |
| 2155 | + $output->writeListEnd(); |
| 2156 | + } |
| 2157 | + } |
| 2158 | + } |
| 2159 | + $output->writeMapEnd(); |
| 2160 | + } |
| 2161 | + $xfer += $output->writeFieldEnd(); |
| 2162 | + } |
| 2163 | + if ($this->ire !== null) { |
| 2164 | + $xfer += $output->writeFieldBegin('ire', TType::STRUCT, 1); |
| 2165 | + $xfer += $this->ire->write($output); |
| 2166 | + $xfer += $output->writeFieldEnd(); |
| 2167 | + } |
| 2168 | + if ($this->ue !== null) { |
| 2169 | + $xfer += $output->writeFieldBegin('ue', TType::STRUCT, 2); |
| 2170 | + $xfer += $this->ue->write($output); |
| 2171 | + $xfer += $output->writeFieldEnd(); |
| 2172 | + } |
| 2173 | + if ($this->te !== null) { |
| 2174 | + $xfer += $output->writeFieldBegin('te', TType::STRUCT, 3); |
| 2175 | + $xfer += $this->te->write($output); |
| 2176 | + $xfer += $output->writeFieldEnd(); |
| 2177 | + } |
| 2178 | + $xfer += $output->writeFieldStop(); |
| 2179 | + $xfer += $output->writeStructEnd(); |
| 2180 | + return $xfer; |
| 2181 | + } |
| 2182 | + |
| 2183 | +} |
| 2184 | + |
| 2185 | +class cassandra_Cassandra_get_count_args { |
| 2186 | + static $_TSPEC; |
| 2187 | + |
| 2188 | + public $keyspace = null; |
| 2189 | + public $key = null; |
| 2190 | + public $column_parent = null; |
| 2191 | + public $consistency_level = 1; |
| 2192 | + |
| 2193 | + public function __construct($vals=null) { |
| 2194 | + if (!isset(self::$_TSPEC)) { |
| 2195 | + self::$_TSPEC = array( |
| 2196 | + 1 => array( |
| 2197 | + 'var' => 'keyspace', |
| 2198 | + 'type' => TType::STRING, |
| 2199 | + ), |
| 2200 | + 2 => array( |
| 2201 | + 'var' => 'key', |
| 2202 | + 'type' => TType::STRING, |
| 2203 | + ), |
| 2204 | + 3 => array( |
| 2205 | + 'var' => 'column_parent', |
| 2206 | + 'type' => TType::STRUCT, |
| 2207 | + 'class' => 'cassandra_ColumnParent', |
| 2208 | + ), |
| 2209 | + 4 => array( |
| 2210 | + 'var' => 'consistency_level', |
| 2211 | + 'type' => TType::I32, |
| 2212 | + ), |
| 2213 | + ); |
| 2214 | + } |
| 2215 | + if (is_array($vals)) { |
| 2216 | + if (isset($vals['keyspace'])) { |
| 2217 | + $this->keyspace = $vals['keyspace']; |
| 2218 | + } |
| 2219 | + if (isset($vals['key'])) { |
| 2220 | + $this->key = $vals['key']; |
| 2221 | + } |
| 2222 | + if (isset($vals['column_parent'])) { |
| 2223 | + $this->column_parent = $vals['column_parent']; |
| 2224 | + } |
| 2225 | + if (isset($vals['consistency_level'])) { |
| 2226 | + $this->consistency_level = $vals['consistency_level']; |
| 2227 | + } |
| 2228 | + } |
| 2229 | + } |
| 2230 | + |
| 2231 | + public function getName() { |
| 2232 | + return 'Cassandra_get_count_args'; |
| 2233 | + } |
| 2234 | + |
| 2235 | + public function read($input) |
| 2236 | + { |
| 2237 | + $xfer = 0; |
| 2238 | + $fname = null; |
| 2239 | + $ftype = 0; |
| 2240 | + $fid = 0; |
| 2241 | + $xfer += $input->readStructBegin($fname); |
| 2242 | + while (true) |
| 2243 | + { |
| 2244 | + $xfer += $input->readFieldBegin($fname, $ftype, $fid); |
| 2245 | + if ($ftype == TType::STOP) { |
| 2246 | + break; |
| 2247 | + } |
| 2248 | + switch ($fid) |
| 2249 | + { |
| 2250 | + case 1: |
| 2251 | + if ($ftype == TType::STRING) { |
| 2252 | + $xfer += $input->readString($this->keyspace); |
| 2253 | + } else { |
| 2254 | + $xfer += $input->skip($ftype); |
| 2255 | + } |
| 2256 | + break; |
| 2257 | + case 2: |
| 2258 | + if ($ftype == TType::STRING) { |
| 2259 | + $xfer += $input->readString($this->key); |
| 2260 | + } else { |
| 2261 | + $xfer += $input->skip($ftype); |
| 2262 | + } |
| 2263 | + break; |
| 2264 | + case 3: |
| 2265 | + if ($ftype == TType::STRUCT) { |
| 2266 | + $this->column_parent = new cassandra_ColumnParent(); |
| 2267 | + $xfer += $this->column_parent->read($input); |
| 2268 | + } else { |
| 2269 | + $xfer += $input->skip($ftype); |
| 2270 | + } |
| 2271 | + break; |
| 2272 | + case 4: |
| 2273 | + if ($ftype == TType::I32) { |
| 2274 | + $xfer += $input->readI32($this->consistency_level); |
| 2275 | + } else { |
| 2276 | + $xfer += $input->skip($ftype); |
| 2277 | + } |
| 2278 | + break; |
| 2279 | + default: |
| 2280 | + $xfer += $input->skip($ftype); |
| 2281 | + break; |
| 2282 | + } |
| 2283 | + $xfer += $input->readFieldEnd(); |
| 2284 | + } |
| 2285 | + $xfer += $input->readStructEnd(); |
| 2286 | + return $xfer; |
| 2287 | + } |
| 2288 | + |
| 2289 | + public function write($output) { |
| 2290 | + $xfer = 0; |
| 2291 | + $xfer += $output->writeStructBegin('Cassandra_get_count_args'); |
| 2292 | + if ($this->keyspace !== null) { |
| 2293 | + $xfer += $output->writeFieldBegin('keyspace', TType::STRING, 1); |
| 2294 | + $xfer += $output->writeString($this->keyspace); |
| 2295 | + $xfer += $output->writeFieldEnd(); |
| 2296 | + } |
| 2297 | + if ($this->key !== null) { |
| 2298 | + $xfer += $output->writeFieldBegin('key', TType::STRING, 2); |
| 2299 | + $xfer += $output->writeString($this->key); |
| 2300 | + $xfer += $output->writeFieldEnd(); |
| 2301 | + } |
| 2302 | + if ($this->column_parent !== null) { |
| 2303 | + if (!is_object($this->column_parent)) { |
| 2304 | + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); |
| 2305 | + } |
| 2306 | + $xfer += $output->writeFieldBegin('column_parent', TType::STRUCT, 3); |
| 2307 | + $xfer += $this->column_parent->write($output); |
| 2308 | + $xfer += $output->writeFieldEnd(); |
| 2309 | + } |
| 2310 | + if ($this->consistency_level !== null) { |
| 2311 | + $xfer += $output->writeFieldBegin('consistency_level', TType::I32, 4); |
| 2312 | + $xfer += $output->writeI32($this->consistency_level); |
| 2313 | + $xfer += $output->writeFieldEnd(); |
| 2314 | + } |
| 2315 | + $xfer += $output->writeFieldStop(); |
| 2316 | + $xfer += $output->writeStructEnd(); |
| 2317 | + return $xfer; |
| 2318 | + } |
| 2319 | + |
| 2320 | +} |
| 2321 | + |
| 2322 | +class cassandra_Cassandra_get_count_result { |
| 2323 | + static $_TSPEC; |
| 2324 | + |
| 2325 | + public $success = null; |
| 2326 | + public $ire = null; |
| 2327 | + public $ue = null; |
| 2328 | + public $te = null; |
| 2329 | + |
| 2330 | + public function __construct($vals=null) { |
| 2331 | + if (!isset(self::$_TSPEC)) { |
| 2332 | + self::$_TSPEC = array( |
| 2333 | + 0 => array( |
| 2334 | + 'var' => 'success', |
| 2335 | + 'type' => TType::I32, |
| 2336 | + ), |
| 2337 | + 1 => array( |
| 2338 | + 'var' => 'ire', |
| 2339 | + 'type' => TType::STRUCT, |
| 2340 | + 'class' => 'cassandra_InvalidRequestException', |
| 2341 | + ), |
| 2342 | + 2 => array( |
| 2343 | + 'var' => 'ue', |
| 2344 | + 'type' => TType::STRUCT, |
| 2345 | + 'class' => 'cassandra_UnavailableException', |
| 2346 | + ), |
| 2347 | + 3 => array( |
| 2348 | + 'var' => 'te', |
| 2349 | + 'type' => TType::STRUCT, |
| 2350 | + 'class' => 'cassandra_TimedOutException', |
| 2351 | + ), |
| 2352 | + ); |
| 2353 | + } |
| 2354 | + if (is_array($vals)) { |
| 2355 | + if (isset($vals['success'])) { |
| 2356 | + $this->success = $vals['success']; |
| 2357 | + } |
| 2358 | + if (isset($vals['ire'])) { |
| 2359 | + $this->ire = $vals['ire']; |
| 2360 | + } |
| 2361 | + if (isset($vals['ue'])) { |
| 2362 | + $this->ue = $vals['ue']; |
| 2363 | + } |
| 2364 | + if (isset($vals['te'])) { |
| 2365 | + $this->te = $vals['te']; |
| 2366 | + } |
| 2367 | + } |
| 2368 | + } |
| 2369 | + |
| 2370 | + public function getName() { |
| 2371 | + return 'Cassandra_get_count_result'; |
| 2372 | + } |
| 2373 | + |
| 2374 | + public function read($input) |
| 2375 | + { |
| 2376 | + $xfer = 0; |
| 2377 | + $fname = null; |
| 2378 | + $ftype = 0; |
| 2379 | + $fid = 0; |
| 2380 | + $xfer += $input->readStructBegin($fname); |
| 2381 | + while (true) |
| 2382 | + { |
| 2383 | + $xfer += $input->readFieldBegin($fname, $ftype, $fid); |
| 2384 | + if ($ftype == TType::STOP) { |
| 2385 | + break; |
| 2386 | + } |
| 2387 | + switch ($fid) |
| 2388 | + { |
| 2389 | + case 0: |
| 2390 | + if ($ftype == TType::I32) { |
| 2391 | + $xfer += $input->readI32($this->success); |
| 2392 | + } else { |
| 2393 | + $xfer += $input->skip($ftype); |
| 2394 | + } |
| 2395 | + break; |
| 2396 | + case 1: |
| 2397 | + if ($ftype == TType::STRUCT) { |
| 2398 | + $this->ire = new cassandra_InvalidRequestException(); |
| 2399 | + $xfer += $this->ire->read($input); |
| 2400 | + } else { |
| 2401 | + $xfer += $input->skip($ftype); |
| 2402 | + } |
| 2403 | + break; |
| 2404 | + case 2: |
| 2405 | + if ($ftype == TType::STRUCT) { |
| 2406 | + $this->ue = new cassandra_UnavailableException(); |
| 2407 | + $xfer += $this->ue->read($input); |
| 2408 | + } else { |
| 2409 | + $xfer += $input->skip($ftype); |
| 2410 | + } |
| 2411 | + break; |
| 2412 | + case 3: |
| 2413 | + if ($ftype == TType::STRUCT) { |
| 2414 | + $this->te = new cassandra_TimedOutException(); |
| 2415 | + $xfer += $this->te->read($input); |
| 2416 | + } else { |
| 2417 | + $xfer += $input->skip($ftype); |
| 2418 | + } |
| 2419 | + break; |
| 2420 | + default: |
| 2421 | + $xfer += $input->skip($ftype); |
| 2422 | + break; |
| 2423 | + } |
| 2424 | + $xfer += $input->readFieldEnd(); |
| 2425 | + } |
| 2426 | + $xfer += $input->readStructEnd(); |
| 2427 | + return $xfer; |
| 2428 | + } |
| 2429 | + |
| 2430 | + public function write($output) { |
| 2431 | + $xfer = 0; |
| 2432 | + $xfer += $output->writeStructBegin('Cassandra_get_count_result'); |
| 2433 | + if ($this->success !== null) { |
| 2434 | + $xfer += $output->writeFieldBegin('success', TType::I32, 0); |
| 2435 | + $xfer += $output->writeI32($this->success); |
| 2436 | + $xfer += $output->writeFieldEnd(); |
| 2437 | + } |
| 2438 | + if ($this->ire !== null) { |
| 2439 | + $xfer += $output->writeFieldBegin('ire', TType::STRUCT, 1); |
| 2440 | + $xfer += $this->ire->write($output); |
| 2441 | + $xfer += $output->writeFieldEnd(); |
| 2442 | + } |
| 2443 | + if ($this->ue !== null) { |
| 2444 | + $xfer += $output->writeFieldBegin('ue', TType::STRUCT, 2); |
| 2445 | + $xfer += $this->ue->write($output); |
| 2446 | + $xfer += $output->writeFieldEnd(); |
| 2447 | + } |
| 2448 | + if ($this->te !== null) { |
| 2449 | + $xfer += $output->writeFieldBegin('te', TType::STRUCT, 3); |
| 2450 | + $xfer += $this->te->write($output); |
| 2451 | + $xfer += $output->writeFieldEnd(); |
| 2452 | + } |
| 2453 | + $xfer += $output->writeFieldStop(); |
| 2454 | + $xfer += $output->writeStructEnd(); |
| 2455 | + return $xfer; |
| 2456 | + } |
| 2457 | + |
| 2458 | +} |
| 2459 | + |
| 2460 | +class cassandra_Cassandra_get_key_range_args { |
| 2461 | + static $_TSPEC; |
| 2462 | + |
| 2463 | + public $keyspace = null; |
| 2464 | + public $column_family = null; |
| 2465 | + public $start = ""; |
| 2466 | + public $finish = ""; |
| 2467 | + public $count = 100; |
| 2468 | + public $consistency_level = 1; |
| 2469 | + |
| 2470 | + public function __construct($vals=null) { |
| 2471 | + if (!isset(self::$_TSPEC)) { |
| 2472 | + self::$_TSPEC = array( |
| 2473 | + 1 => array( |
| 2474 | + 'var' => 'keyspace', |
| 2475 | + 'type' => TType::STRING, |
| 2476 | + ), |
| 2477 | + 2 => array( |
| 2478 | + 'var' => 'column_family', |
| 2479 | + 'type' => TType::STRING, |
| 2480 | + ), |
| 2481 | + 3 => array( |
| 2482 | + 'var' => 'start', |
| 2483 | + 'type' => TType::STRING, |
| 2484 | + ), |
| 2485 | + 4 => array( |
| 2486 | + 'var' => 'finish', |
| 2487 | + 'type' => TType::STRING, |
| 2488 | + ), |
| 2489 | + 5 => array( |
| 2490 | + 'var' => 'count', |
| 2491 | + 'type' => TType::I32, |
| 2492 | + ), |
| 2493 | + 6 => array( |
| 2494 | + 'var' => 'consistency_level', |
| 2495 | + 'type' => TType::I32, |
| 2496 | + ), |
| 2497 | + ); |
| 2498 | + } |
| 2499 | + if (is_array($vals)) { |
| 2500 | + if (isset($vals['keyspace'])) { |
| 2501 | + $this->keyspace = $vals['keyspace']; |
| 2502 | + } |
| 2503 | + if (isset($vals['column_family'])) { |
| 2504 | + $this->column_family = $vals['column_family']; |
| 2505 | + } |
| 2506 | + if (isset($vals['start'])) { |
| 2507 | + $this->start = $vals['start']; |
| 2508 | + } |
| 2509 | + if (isset($vals['finish'])) { |
| 2510 | + $this->finish = $vals['finish']; |
| 2511 | + } |
| 2512 | + if (isset($vals['count'])) { |
| 2513 | + $this->count = $vals['count']; |
| 2514 | + } |
| 2515 | + if (isset($vals['consistency_level'])) { |
| 2516 | + $this->consistency_level = $vals['consistency_level']; |
| 2517 | + } |
| 2518 | + } |
| 2519 | + } |
| 2520 | + |
| 2521 | + public function getName() { |
| 2522 | + return 'Cassandra_get_key_range_args'; |
| 2523 | + } |
| 2524 | + |
| 2525 | + public function read($input) |
| 2526 | + { |
| 2527 | + $xfer = 0; |
| 2528 | + $fname = null; |
| 2529 | + $ftype = 0; |
| 2530 | + $fid = 0; |
| 2531 | + $xfer += $input->readStructBegin($fname); |
| 2532 | + while (true) |
| 2533 | + { |
| 2534 | + $xfer += $input->readFieldBegin($fname, $ftype, $fid); |
| 2535 | + if ($ftype == TType::STOP) { |
| 2536 | + break; |
| 2537 | + } |
| 2538 | + switch ($fid) |
| 2539 | + { |
| 2540 | + case 1: |
| 2541 | + if ($ftype == TType::STRING) { |
| 2542 | + $xfer += $input->readString($this->keyspace); |
| 2543 | + } else { |
| 2544 | + $xfer += $input->skip($ftype); |
| 2545 | + } |
| 2546 | + break; |
| 2547 | + case 2: |
| 2548 | + if ($ftype == TType::STRING) { |
| 2549 | + $xfer += $input->readString($this->column_family); |
| 2550 | + } else { |
| 2551 | + $xfer += $input->skip($ftype); |
| 2552 | + } |
| 2553 | + break; |
| 2554 | + case 3: |
| 2555 | + if ($ftype == TType::STRING) { |
| 2556 | + $xfer += $input->readString($this->start); |
| 2557 | + } else { |
| 2558 | + $xfer += $input->skip($ftype); |
| 2559 | + } |
| 2560 | + break; |
| 2561 | + case 4: |
| 2562 | + if ($ftype == TType::STRING) { |
| 2563 | + $xfer += $input->readString($this->finish); |
| 2564 | + } else { |
| 2565 | + $xfer += $input->skip($ftype); |
| 2566 | + } |
| 2567 | + break; |
| 2568 | + case 5: |
| 2569 | + if ($ftype == TType::I32) { |
| 2570 | + $xfer += $input->readI32($this->count); |
| 2571 | + } else { |
| 2572 | + $xfer += $input->skip($ftype); |
| 2573 | + } |
| 2574 | + break; |
| 2575 | + case 6: |
| 2576 | + if ($ftype == TType::I32) { |
| 2577 | + $xfer += $input->readI32($this->consistency_level); |
| 2578 | + } else { |
| 2579 | + $xfer += $input->skip($ftype); |
| 2580 | + } |
| 2581 | + break; |
| 2582 | + default: |
| 2583 | + $xfer += $input->skip($ftype); |
| 2584 | + break; |
| 2585 | + } |
| 2586 | + $xfer += $input->readFieldEnd(); |
| 2587 | + } |
| 2588 | + $xfer += $input->readStructEnd(); |
| 2589 | + return $xfer; |
| 2590 | + } |
| 2591 | + |
| 2592 | + public function write($output) { |
| 2593 | + $xfer = 0; |
| 2594 | + $xfer += $output->writeStructBegin('Cassandra_get_key_range_args'); |
| 2595 | + if ($this->keyspace !== null) { |
| 2596 | + $xfer += $output->writeFieldBegin('keyspace', TType::STRING, 1); |
| 2597 | + $xfer += $output->writeString($this->keyspace); |
| 2598 | + $xfer += $output->writeFieldEnd(); |
| 2599 | + } |
| 2600 | + if ($this->column_family !== null) { |
| 2601 | + $xfer += $output->writeFieldBegin('column_family', TType::STRING, 2); |
| 2602 | + $xfer += $output->writeString($this->column_family); |
| 2603 | + $xfer += $output->writeFieldEnd(); |
| 2604 | + } |
| 2605 | + if ($this->start !== null) { |
| 2606 | + $xfer += $output->writeFieldBegin('start', TType::STRING, 3); |
| 2607 | + $xfer += $output->writeString($this->start); |
| 2608 | + $xfer += $output->writeFieldEnd(); |
| 2609 | + } |
| 2610 | + if ($this->finish !== null) { |
| 2611 | + $xfer += $output->writeFieldBegin('finish', TType::STRING, 4); |
| 2612 | + $xfer += $output->writeString($this->finish); |
| 2613 | + $xfer += $output->writeFieldEnd(); |
| 2614 | + } |
| 2615 | + if ($this->count !== null) { |
| 2616 | + $xfer += $output->writeFieldBegin('count', TType::I32, 5); |
| 2617 | + $xfer += $output->writeI32($this->count); |
| 2618 | + $xfer += $output->writeFieldEnd(); |
| 2619 | + } |
| 2620 | + if ($this->consistency_level !== null) { |
| 2621 | + $xfer += $output->writeFieldBegin('consistency_level', TType::I32, 6); |
| 2622 | + $xfer += $output->writeI32($this->consistency_level); |
| 2623 | + $xfer += $output->writeFieldEnd(); |
| 2624 | + } |
| 2625 | + $xfer += $output->writeFieldStop(); |
| 2626 | + $xfer += $output->writeStructEnd(); |
| 2627 | + return $xfer; |
| 2628 | + } |
| 2629 | + |
| 2630 | +} |
| 2631 | + |
| 2632 | +class cassandra_Cassandra_get_key_range_result { |
| 2633 | + static $_TSPEC; |
| 2634 | + |
| 2635 | + public $success = null; |
| 2636 | + public $ire = null; |
| 2637 | + public $ue = null; |
| 2638 | + public $te = null; |
| 2639 | + |
| 2640 | + public function __construct($vals=null) { |
| 2641 | + if (!isset(self::$_TSPEC)) { |
| 2642 | + self::$_TSPEC = array( |
| 2643 | + 0 => array( |
| 2644 | + 'var' => 'success', |
| 2645 | + 'type' => TType::LST, |
| 2646 | + 'etype' => TType::STRING, |
| 2647 | + 'elem' => array( |
| 2648 | + 'type' => TType::STRING, |
| 2649 | + ), |
| 2650 | + ), |
| 2651 | + 1 => array( |
| 2652 | + 'var' => 'ire', |
| 2653 | + 'type' => TType::STRUCT, |
| 2654 | + 'class' => 'cassandra_InvalidRequestException', |
| 2655 | + ), |
| 2656 | + 2 => array( |
| 2657 | + 'var' => 'ue', |
| 2658 | + 'type' => TType::STRUCT, |
| 2659 | + 'class' => 'cassandra_UnavailableException', |
| 2660 | + ), |
| 2661 | + 3 => array( |
| 2662 | + 'var' => 'te', |
| 2663 | + 'type' => TType::STRUCT, |
| 2664 | + 'class' => 'cassandra_TimedOutException', |
| 2665 | + ), |
| 2666 | + ); |
| 2667 | + } |
| 2668 | + if (is_array($vals)) { |
| 2669 | + if (isset($vals['success'])) { |
| 2670 | + $this->success = $vals['success']; |
| 2671 | + } |
| 2672 | + if (isset($vals['ire'])) { |
| 2673 | + $this->ire = $vals['ire']; |
| 2674 | + } |
| 2675 | + if (isset($vals['ue'])) { |
| 2676 | + $this->ue = $vals['ue']; |
| 2677 | + } |
| 2678 | + if (isset($vals['te'])) { |
| 2679 | + $this->te = $vals['te']; |
| 2680 | + } |
| 2681 | + } |
| 2682 | + } |
| 2683 | + |
| 2684 | + public function getName() { |
| 2685 | + return 'Cassandra_get_key_range_result'; |
| 2686 | + } |
| 2687 | + |
| 2688 | + public function read($input) |
| 2689 | + { |
| 2690 | + $xfer = 0; |
| 2691 | + $fname = null; |
| 2692 | + $ftype = 0; |
| 2693 | + $fid = 0; |
| 2694 | + $xfer += $input->readStructBegin($fname); |
| 2695 | + while (true) |
| 2696 | + { |
| 2697 | + $xfer += $input->readFieldBegin($fname, $ftype, $fid); |
| 2698 | + if ($ftype == TType::STOP) { |
| 2699 | + break; |
| 2700 | + } |
| 2701 | + switch ($fid) |
| 2702 | + { |
| 2703 | + case 0: |
| 2704 | + if ($ftype == TType::LST) { |
| 2705 | + $this->success = array(); |
| 2706 | + $_size67 = 0; |
| 2707 | + $_etype70 = 0; |
| 2708 | + $xfer += $input->readListBegin($_etype70, $_size67); |
| 2709 | + for ($_i71 = 0; $_i71 < $_size67; ++$_i71) |
| 2710 | + { |
| 2711 | + $elem72 = null; |
| 2712 | + $xfer += $input->readString($elem72); |
| 2713 | + $this->success []= $elem72; |
| 2714 | + } |
| 2715 | + $xfer += $input->readListEnd(); |
| 2716 | + } else { |
| 2717 | + $xfer += $input->skip($ftype); |
| 2718 | + } |
| 2719 | + break; |
| 2720 | + case 1: |
| 2721 | + if ($ftype == TType::STRUCT) { |
| 2722 | + $this->ire = new cassandra_InvalidRequestException(); |
| 2723 | + $xfer += $this->ire->read($input); |
| 2724 | + } else { |
| 2725 | + $xfer += $input->skip($ftype); |
| 2726 | + } |
| 2727 | + break; |
| 2728 | + case 2: |
| 2729 | + if ($ftype == TType::STRUCT) { |
| 2730 | + $this->ue = new cassandra_UnavailableException(); |
| 2731 | + $xfer += $this->ue->read($input); |
| 2732 | + } else { |
| 2733 | + $xfer += $input->skip($ftype); |
| 2734 | + } |
| 2735 | + break; |
| 2736 | + case 3: |
| 2737 | + if ($ftype == TType::STRUCT) { |
| 2738 | + $this->te = new cassandra_TimedOutException(); |
| 2739 | + $xfer += $this->te->read($input); |
| 2740 | + } else { |
| 2741 | + $xfer += $input->skip($ftype); |
| 2742 | + } |
| 2743 | + break; |
| 2744 | + default: |
| 2745 | + $xfer += $input->skip($ftype); |
| 2746 | + break; |
| 2747 | + } |
| 2748 | + $xfer += $input->readFieldEnd(); |
| 2749 | + } |
| 2750 | + $xfer += $input->readStructEnd(); |
| 2751 | + return $xfer; |
| 2752 | + } |
| 2753 | + |
| 2754 | + public function write($output) { |
| 2755 | + $xfer = 0; |
| 2756 | + $xfer += $output->writeStructBegin('Cassandra_get_key_range_result'); |
| 2757 | + if ($this->success !== null) { |
| 2758 | + if (!is_array($this->success)) { |
| 2759 | + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); |
| 2760 | + } |
| 2761 | + $xfer += $output->writeFieldBegin('success', TType::LST, 0); |
| 2762 | + { |
| 2763 | + $output->writeListBegin(TType::STRING, count($this->success)); |
| 2764 | + { |
| 2765 | + foreach ($this->success as $iter73) |
| 2766 | + { |
| 2767 | + $xfer += $output->writeString($iter73); |
| 2768 | + } |
| 2769 | + } |
| 2770 | + $output->writeListEnd(); |
| 2771 | + } |
| 2772 | + $xfer += $output->writeFieldEnd(); |
| 2773 | + } |
| 2774 | + if ($this->ire !== null) { |
| 2775 | + $xfer += $output->writeFieldBegin('ire', TType::STRUCT, 1); |
| 2776 | + $xfer += $this->ire->write($output); |
| 2777 | + $xfer += $output->writeFieldEnd(); |
| 2778 | + } |
| 2779 | + if ($this->ue !== null) { |
| 2780 | + $xfer += $output->writeFieldBegin('ue', TType::STRUCT, 2); |
| 2781 | + $xfer += $this->ue->write($output); |
| 2782 | + $xfer += $output->writeFieldEnd(); |
| 2783 | + } |
| 2784 | + if ($this->te !== null) { |
| 2785 | + $xfer += $output->writeFieldBegin('te', TType::STRUCT, 3); |
| 2786 | + $xfer += $this->te->write($output); |
| 2787 | + $xfer += $output->writeFieldEnd(); |
| 2788 | + } |
| 2789 | + $xfer += $output->writeFieldStop(); |
| 2790 | + $xfer += $output->writeStructEnd(); |
| 2791 | + return $xfer; |
| 2792 | + } |
| 2793 | + |
| 2794 | +} |
| 2795 | + |
| 2796 | +class cassandra_Cassandra_get_range_slice_args { |
| 2797 | + static $_TSPEC; |
| 2798 | + |
| 2799 | + public $keyspace = null; |
| 2800 | + public $column_parent = null; |
| 2801 | + public $predicate = null; |
| 2802 | + public $start_key = ""; |
| 2803 | + public $finish_key = ""; |
| 2804 | + public $row_count = 100; |
| 2805 | + public $consistency_level = 1; |
| 2806 | + |
| 2807 | + public function __construct($vals=null) { |
| 2808 | + if (!isset(self::$_TSPEC)) { |
| 2809 | + self::$_TSPEC = array( |
| 2810 | + 1 => array( |
| 2811 | + 'var' => 'keyspace', |
| 2812 | + 'type' => TType::STRING, |
| 2813 | + ), |
| 2814 | + 2 => array( |
| 2815 | + 'var' => 'column_parent', |
| 2816 | + 'type' => TType::STRUCT, |
| 2817 | + 'class' => 'cassandra_ColumnParent', |
| 2818 | + ), |
| 2819 | + 3 => array( |
| 2820 | + 'var' => 'predicate', |
| 2821 | + 'type' => TType::STRUCT, |
| 2822 | + 'class' => 'cassandra_SlicePredicate', |
| 2823 | + ), |
| 2824 | + 4 => array( |
| 2825 | + 'var' => 'start_key', |
| 2826 | + 'type' => TType::STRING, |
| 2827 | + ), |
| 2828 | + 5 => array( |
| 2829 | + 'var' => 'finish_key', |
| 2830 | + 'type' => TType::STRING, |
| 2831 | + ), |
| 2832 | + 6 => array( |
| 2833 | + 'var' => 'row_count', |
| 2834 | + 'type' => TType::I32, |
| 2835 | + ), |
| 2836 | + 7 => array( |
| 2837 | + 'var' => 'consistency_level', |
| 2838 | + 'type' => TType::I32, |
| 2839 | + ), |
| 2840 | + ); |
| 2841 | + } |
| 2842 | + if (is_array($vals)) { |
| 2843 | + if (isset($vals['keyspace'])) { |
| 2844 | + $this->keyspace = $vals['keyspace']; |
| 2845 | + } |
| 2846 | + if (isset($vals['column_parent'])) { |
| 2847 | + $this->column_parent = $vals['column_parent']; |
| 2848 | + } |
| 2849 | + if (isset($vals['predicate'])) { |
| 2850 | + $this->predicate = $vals['predicate']; |
| 2851 | + } |
| 2852 | + if (isset($vals['start_key'])) { |
| 2853 | + $this->start_key = $vals['start_key']; |
| 2854 | + } |
| 2855 | + if (isset($vals['finish_key'])) { |
| 2856 | + $this->finish_key = $vals['finish_key']; |
| 2857 | + } |
| 2858 | + if (isset($vals['row_count'])) { |
| 2859 | + $this->row_count = $vals['row_count']; |
| 2860 | + } |
| 2861 | + if (isset($vals['consistency_level'])) { |
| 2862 | + $this->consistency_level = $vals['consistency_level']; |
| 2863 | + } |
| 2864 | + } |
| 2865 | + } |
| 2866 | + |
| 2867 | + public function getName() { |
| 2868 | + return 'Cassandra_get_range_slice_args'; |
| 2869 | + } |
| 2870 | + |
| 2871 | + public function read($input) |
| 2872 | + { |
| 2873 | + $xfer = 0; |
| 2874 | + $fname = null; |
| 2875 | + $ftype = 0; |
| 2876 | + $fid = 0; |
| 2877 | + $xfer += $input->readStructBegin($fname); |
| 2878 | + while (true) |
| 2879 | + { |
| 2880 | + $xfer += $input->readFieldBegin($fname, $ftype, $fid); |
| 2881 | + if ($ftype == TType::STOP) { |
| 2882 | + break; |
| 2883 | + } |
| 2884 | + switch ($fid) |
| 2885 | + { |
| 2886 | + case 1: |
| 2887 | + if ($ftype == TType::STRING) { |
| 2888 | + $xfer += $input->readString($this->keyspace); |
| 2889 | + } else { |
| 2890 | + $xfer += $input->skip($ftype); |
| 2891 | + } |
| 2892 | + break; |
| 2893 | + case 2: |
| 2894 | + if ($ftype == TType::STRUCT) { |
| 2895 | + $this->column_parent = new cassandra_ColumnParent(); |
| 2896 | + $xfer += $this->column_parent->read($input); |
| 2897 | + } else { |
| 2898 | + $xfer += $input->skip($ftype); |
| 2899 | + } |
| 2900 | + break; |
| 2901 | + case 3: |
| 2902 | + if ($ftype == TType::STRUCT) { |
| 2903 | + $this->predicate = new cassandra_SlicePredicate(); |
| 2904 | + $xfer += $this->predicate->read($input); |
| 2905 | + } else { |
| 2906 | + $xfer += $input->skip($ftype); |
| 2907 | + } |
| 2908 | + break; |
| 2909 | + case 4: |
| 2910 | + if ($ftype == TType::STRING) { |
| 2911 | + $xfer += $input->readString($this->start_key); |
| 2912 | + } else { |
| 2913 | + $xfer += $input->skip($ftype); |
| 2914 | + } |
| 2915 | + break; |
| 2916 | + case 5: |
| 2917 | + if ($ftype == TType::STRING) { |
| 2918 | + $xfer += $input->readString($this->finish_key); |
| 2919 | + } else { |
| 2920 | + $xfer += $input->skip($ftype); |
| 2921 | + } |
| 2922 | + break; |
| 2923 | + case 6: |
| 2924 | + if ($ftype == TType::I32) { |
| 2925 | + $xfer += $input->readI32($this->row_count); |
| 2926 | + } else { |
| 2927 | + $xfer += $input->skip($ftype); |
| 2928 | + } |
| 2929 | + break; |
| 2930 | + case 7: |
| 2931 | + if ($ftype == TType::I32) { |
| 2932 | + $xfer += $input->readI32($this->consistency_level); |
| 2933 | + } else { |
| 2934 | + $xfer += $input->skip($ftype); |
| 2935 | + } |
| 2936 | + break; |
| 2937 | + default: |
| 2938 | + $xfer += $input->skip($ftype); |
| 2939 | + break; |
| 2940 | + } |
| 2941 | + $xfer += $input->readFieldEnd(); |
| 2942 | + } |
| 2943 | + $xfer += $input->readStructEnd(); |
| 2944 | + return $xfer; |
| 2945 | + } |
| 2946 | + |
| 2947 | + public function write($output) { |
| 2948 | + $xfer = 0; |
| 2949 | + $xfer += $output->writeStructBegin('Cassandra_get_range_slice_args'); |
| 2950 | + if ($this->keyspace !== null) { |
| 2951 | + $xfer += $output->writeFieldBegin('keyspace', TType::STRING, 1); |
| 2952 | + $xfer += $output->writeString($this->keyspace); |
| 2953 | + $xfer += $output->writeFieldEnd(); |
| 2954 | + } |
| 2955 | + if ($this->column_parent !== null) { |
| 2956 | + if (!is_object($this->column_parent)) { |
| 2957 | + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); |
| 2958 | + } |
| 2959 | + $xfer += $output->writeFieldBegin('column_parent', TType::STRUCT, 2); |
| 2960 | + $xfer += $this->column_parent->write($output); |
| 2961 | + $xfer += $output->writeFieldEnd(); |
| 2962 | + } |
| 2963 | + if ($this->predicate !== null) { |
| 2964 | + if (!is_object($this->predicate)) { |
| 2965 | + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); |
| 2966 | + } |
| 2967 | + $xfer += $output->writeFieldBegin('predicate', TType::STRUCT, 3); |
| 2968 | + $xfer += $this->predicate->write($output); |
| 2969 | + $xfer += $output->writeFieldEnd(); |
| 2970 | + } |
| 2971 | + if ($this->start_key !== null) { |
| 2972 | + $xfer += $output->writeFieldBegin('start_key', TType::STRING, 4); |
| 2973 | + $xfer += $output->writeString($this->start_key); |
| 2974 | + $xfer += $output->writeFieldEnd(); |
| 2975 | + } |
| 2976 | + if ($this->finish_key !== null) { |
| 2977 | + $xfer += $output->writeFieldBegin('finish_key', TType::STRING, 5); |
| 2978 | + $xfer += $output->writeString($this->finish_key); |
| 2979 | + $xfer += $output->writeFieldEnd(); |
| 2980 | + } |
| 2981 | + if ($this->row_count !== null) { |
| 2982 | + $xfer += $output->writeFieldBegin('row_count', TType::I32, 6); |
| 2983 | + $xfer += $output->writeI32($this->row_count); |
| 2984 | + $xfer += $output->writeFieldEnd(); |
| 2985 | + } |
| 2986 | + if ($this->consistency_level !== null) { |
| 2987 | + $xfer += $output->writeFieldBegin('consistency_level', TType::I32, 7); |
| 2988 | + $xfer += $output->writeI32($this->consistency_level); |
| 2989 | + $xfer += $output->writeFieldEnd(); |
| 2990 | + } |
| 2991 | + $xfer += $output->writeFieldStop(); |
| 2992 | + $xfer += $output->writeStructEnd(); |
| 2993 | + return $xfer; |
| 2994 | + } |
| 2995 | + |
| 2996 | +} |
| 2997 | + |
| 2998 | +class cassandra_Cassandra_get_range_slice_result { |
| 2999 | + static $_TSPEC; |
| 3000 | + |
| 3001 | + public $success = null; |
| 3002 | + public $ire = null; |
| 3003 | + public $ue = null; |
| 3004 | + public $te = null; |
| 3005 | + |
| 3006 | + public function __construct($vals=null) { |
| 3007 | + if (!isset(self::$_TSPEC)) { |
| 3008 | + self::$_TSPEC = array( |
| 3009 | + 0 => array( |
| 3010 | + 'var' => 'success', |
| 3011 | + 'type' => TType::LST, |
| 3012 | + 'etype' => TType::STRUCT, |
| 3013 | + 'elem' => array( |
| 3014 | + 'type' => TType::STRUCT, |
| 3015 | + 'class' => 'cassandra_KeySlice', |
| 3016 | + ), |
| 3017 | + ), |
| 3018 | + 1 => array( |
| 3019 | + 'var' => 'ire', |
| 3020 | + 'type' => TType::STRUCT, |
| 3021 | + 'class' => 'cassandra_InvalidRequestException', |
| 3022 | + ), |
| 3023 | + 2 => array( |
| 3024 | + 'var' => 'ue', |
| 3025 | + 'type' => TType::STRUCT, |
| 3026 | + 'class' => 'cassandra_UnavailableException', |
| 3027 | + ), |
| 3028 | + 3 => array( |
| 3029 | + 'var' => 'te', |
| 3030 | + 'type' => TType::STRUCT, |
| 3031 | + 'class' => 'cassandra_TimedOutException', |
| 3032 | + ), |
| 3033 | + ); |
| 3034 | + } |
| 3035 | + if (is_array($vals)) { |
| 3036 | + if (isset($vals['success'])) { |
| 3037 | + $this->success = $vals['success']; |
| 3038 | + } |
| 3039 | + if (isset($vals['ire'])) { |
| 3040 | + $this->ire = $vals['ire']; |
| 3041 | + } |
| 3042 | + if (isset($vals['ue'])) { |
| 3043 | + $this->ue = $vals['ue']; |
| 3044 | + } |
| 3045 | + if (isset($vals['te'])) { |
| 3046 | + $this->te = $vals['te']; |
| 3047 | + } |
| 3048 | + } |
| 3049 | + } |
| 3050 | + |
| 3051 | + public function getName() { |
| 3052 | + return 'Cassandra_get_range_slice_result'; |
| 3053 | + } |
| 3054 | + |
| 3055 | + public function read($input) |
| 3056 | + { |
| 3057 | + $xfer = 0; |
| 3058 | + $fname = null; |
| 3059 | + $ftype = 0; |
| 3060 | + $fid = 0; |
| 3061 | + $xfer += $input->readStructBegin($fname); |
| 3062 | + while (true) |
| 3063 | + { |
| 3064 | + $xfer += $input->readFieldBegin($fname, $ftype, $fid); |
| 3065 | + if ($ftype == TType::STOP) { |
| 3066 | + break; |
| 3067 | + } |
| 3068 | + switch ($fid) |
| 3069 | + { |
| 3070 | + case 0: |
| 3071 | + if ($ftype == TType::LST) { |
| 3072 | + $this->success = array(); |
| 3073 | + $_size74 = 0; |
| 3074 | + $_etype77 = 0; |
| 3075 | + $xfer += $input->readListBegin($_etype77, $_size74); |
| 3076 | + for ($_i78 = 0; $_i78 < $_size74; ++$_i78) |
| 3077 | + { |
| 3078 | + $elem79 = null; |
| 3079 | + $elem79 = new cassandra_KeySlice(); |
| 3080 | + $xfer += $elem79->read($input); |
| 3081 | + $this->success []= $elem79; |
| 3082 | + } |
| 3083 | + $xfer += $input->readListEnd(); |
| 3084 | + } else { |
| 3085 | + $xfer += $input->skip($ftype); |
| 3086 | + } |
| 3087 | + break; |
| 3088 | + case 1: |
| 3089 | + if ($ftype == TType::STRUCT) { |
| 3090 | + $this->ire = new cassandra_InvalidRequestException(); |
| 3091 | + $xfer += $this->ire->read($input); |
| 3092 | + } else { |
| 3093 | + $xfer += $input->skip($ftype); |
| 3094 | + } |
| 3095 | + break; |
| 3096 | + case 2: |
| 3097 | + if ($ftype == TType::STRUCT) { |
| 3098 | + $this->ue = new cassandra_UnavailableException(); |
| 3099 | + $xfer += $this->ue->read($input); |
| 3100 | + } else { |
| 3101 | + $xfer += $input->skip($ftype); |
| 3102 | + } |
| 3103 | + break; |
| 3104 | + case 3: |
| 3105 | + if ($ftype == TType::STRUCT) { |
| 3106 | + $this->te = new cassandra_TimedOutException(); |
| 3107 | + $xfer += $this->te->read($input); |
| 3108 | + } else { |
| 3109 | + $xfer += $input->skip($ftype); |
| 3110 | + } |
| 3111 | + break; |
| 3112 | + default: |
| 3113 | + $xfer += $input->skip($ftype); |
| 3114 | + break; |
| 3115 | + } |
| 3116 | + $xfer += $input->readFieldEnd(); |
| 3117 | + } |
| 3118 | + $xfer += $input->readStructEnd(); |
| 3119 | + return $xfer; |
| 3120 | + } |
| 3121 | + |
| 3122 | + public function write($output) { |
| 3123 | + $xfer = 0; |
| 3124 | + $xfer += $output->writeStructBegin('Cassandra_get_range_slice_result'); |
| 3125 | + if ($this->success !== null) { |
| 3126 | + if (!is_array($this->success)) { |
| 3127 | + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); |
| 3128 | + } |
| 3129 | + $xfer += $output->writeFieldBegin('success', TType::LST, 0); |
| 3130 | + { |
| 3131 | + $output->writeListBegin(TType::STRUCT, count($this->success)); |
| 3132 | + { |
| 3133 | + foreach ($this->success as $iter80) |
| 3134 | + { |
| 3135 | + $xfer += $iter80->write($output); |
| 3136 | + } |
| 3137 | + } |
| 3138 | + $output->writeListEnd(); |
| 3139 | + } |
| 3140 | + $xfer += $output->writeFieldEnd(); |
| 3141 | + } |
| 3142 | + if ($this->ire !== null) { |
| 3143 | + $xfer += $output->writeFieldBegin('ire', TType::STRUCT, 1); |
| 3144 | + $xfer += $this->ire->write($output); |
| 3145 | + $xfer += $output->writeFieldEnd(); |
| 3146 | + } |
| 3147 | + if ($this->ue !== null) { |
| 3148 | + $xfer += $output->writeFieldBegin('ue', TType::STRUCT, 2); |
| 3149 | + $xfer += $this->ue->write($output); |
| 3150 | + $xfer += $output->writeFieldEnd(); |
| 3151 | + } |
| 3152 | + if ($this->te !== null) { |
| 3153 | + $xfer += $output->writeFieldBegin('te', TType::STRUCT, 3); |
| 3154 | + $xfer += $this->te->write($output); |
| 3155 | + $xfer += $output->writeFieldEnd(); |
| 3156 | + } |
| 3157 | + $xfer += $output->writeFieldStop(); |
| 3158 | + $xfer += $output->writeStructEnd(); |
| 3159 | + return $xfer; |
| 3160 | + } |
| 3161 | + |
| 3162 | +} |
| 3163 | + |
| 3164 | +class cassandra_Cassandra_insert_args { |
| 3165 | + static $_TSPEC; |
| 3166 | + |
| 3167 | + public $keyspace = null; |
| 3168 | + public $key = null; |
| 3169 | + public $column_path = null; |
| 3170 | + public $value = null; |
| 3171 | + public $timestamp = null; |
| 3172 | + public $consistency_level = 0; |
| 3173 | + |
| 3174 | + public function __construct($vals=null) { |
| 3175 | + if (!isset(self::$_TSPEC)) { |
| 3176 | + self::$_TSPEC = array( |
| 3177 | + 1 => array( |
| 3178 | + 'var' => 'keyspace', |
| 3179 | + 'type' => TType::STRING, |
| 3180 | + ), |
| 3181 | + 2 => array( |
| 3182 | + 'var' => 'key', |
| 3183 | + 'type' => TType::STRING, |
| 3184 | + ), |
| 3185 | + 3 => array( |
| 3186 | + 'var' => 'column_path', |
| 3187 | + 'type' => TType::STRUCT, |
| 3188 | + 'class' => 'cassandra_ColumnPath', |
| 3189 | + ), |
| 3190 | + 4 => array( |
| 3191 | + 'var' => 'value', |
| 3192 | + 'type' => TType::STRING, |
| 3193 | + ), |
| 3194 | + 5 => array( |
| 3195 | + 'var' => 'timestamp', |
| 3196 | + 'type' => TType::I64, |
| 3197 | + ), |
| 3198 | + 6 => array( |
| 3199 | + 'var' => 'consistency_level', |
| 3200 | + 'type' => TType::I32, |
| 3201 | + ), |
| 3202 | + ); |
| 3203 | + } |
| 3204 | + if (is_array($vals)) { |
| 3205 | + if (isset($vals['keyspace'])) { |
| 3206 | + $this->keyspace = $vals['keyspace']; |
| 3207 | + } |
| 3208 | + if (isset($vals['key'])) { |
| 3209 | + $this->key = $vals['key']; |
| 3210 | + } |
| 3211 | + if (isset($vals['column_path'])) { |
| 3212 | + $this->column_path = $vals['column_path']; |
| 3213 | + } |
| 3214 | + if (isset($vals['value'])) { |
| 3215 | + $this->value = $vals['value']; |
| 3216 | + } |
| 3217 | + if (isset($vals['timestamp'])) { |
| 3218 | + $this->timestamp = $vals['timestamp']; |
| 3219 | + } |
| 3220 | + if (isset($vals['consistency_level'])) { |
| 3221 | + $this->consistency_level = $vals['consistency_level']; |
| 3222 | + } |
| 3223 | + } |
| 3224 | + } |
| 3225 | + |
| 3226 | + public function getName() { |
| 3227 | + return 'Cassandra_insert_args'; |
| 3228 | + } |
| 3229 | + |
| 3230 | + public function read($input) |
| 3231 | + { |
| 3232 | + $xfer = 0; |
| 3233 | + $fname = null; |
| 3234 | + $ftype = 0; |
| 3235 | + $fid = 0; |
| 3236 | + $xfer += $input->readStructBegin($fname); |
| 3237 | + while (true) |
| 3238 | + { |
| 3239 | + $xfer += $input->readFieldBegin($fname, $ftype, $fid); |
| 3240 | + if ($ftype == TType::STOP) { |
| 3241 | + break; |
| 3242 | + } |
| 3243 | + switch ($fid) |
| 3244 | + { |
| 3245 | + case 1: |
| 3246 | + if ($ftype == TType::STRING) { |
| 3247 | + $xfer += $input->readString($this->keyspace); |
| 3248 | + } else { |
| 3249 | + $xfer += $input->skip($ftype); |
| 3250 | + } |
| 3251 | + break; |
| 3252 | + case 2: |
| 3253 | + if ($ftype == TType::STRING) { |
| 3254 | + $xfer += $input->readString($this->key); |
| 3255 | + } else { |
| 3256 | + $xfer += $input->skip($ftype); |
| 3257 | + } |
| 3258 | + break; |
| 3259 | + case 3: |
| 3260 | + if ($ftype == TType::STRUCT) { |
| 3261 | + $this->column_path = new cassandra_ColumnPath(); |
| 3262 | + $xfer += $this->column_path->read($input); |
| 3263 | + } else { |
| 3264 | + $xfer += $input->skip($ftype); |
| 3265 | + } |
| 3266 | + break; |
| 3267 | + case 4: |
| 3268 | + if ($ftype == TType::STRING) { |
| 3269 | + $xfer += $input->readString($this->value); |
| 3270 | + } else { |
| 3271 | + $xfer += $input->skip($ftype); |
| 3272 | + } |
| 3273 | + break; |
| 3274 | + case 5: |
| 3275 | + if ($ftype == TType::I64) { |
| 3276 | + $xfer += $input->readI64($this->timestamp); |
| 3277 | + } else { |
| 3278 | + $xfer += $input->skip($ftype); |
| 3279 | + } |
| 3280 | + break; |
| 3281 | + case 6: |
| 3282 | + if ($ftype == TType::I32) { |
| 3283 | + $xfer += $input->readI32($this->consistency_level); |
| 3284 | + } else { |
| 3285 | + $xfer += $input->skip($ftype); |
| 3286 | + } |
| 3287 | + break; |
| 3288 | + default: |
| 3289 | + $xfer += $input->skip($ftype); |
| 3290 | + break; |
| 3291 | + } |
| 3292 | + $xfer += $input->readFieldEnd(); |
| 3293 | + } |
| 3294 | + $xfer += $input->readStructEnd(); |
| 3295 | + return $xfer; |
| 3296 | + } |
| 3297 | + |
| 3298 | + public function write($output) { |
| 3299 | + $xfer = 0; |
| 3300 | + $xfer += $output->writeStructBegin('Cassandra_insert_args'); |
| 3301 | + if ($this->keyspace !== null) { |
| 3302 | + $xfer += $output->writeFieldBegin('keyspace', TType::STRING, 1); |
| 3303 | + $xfer += $output->writeString($this->keyspace); |
| 3304 | + $xfer += $output->writeFieldEnd(); |
| 3305 | + } |
| 3306 | + if ($this->key !== null) { |
| 3307 | + $xfer += $output->writeFieldBegin('key', TType::STRING, 2); |
| 3308 | + $xfer += $output->writeString($this->key); |
| 3309 | + $xfer += $output->writeFieldEnd(); |
| 3310 | + } |
| 3311 | + if ($this->column_path !== null) { |
| 3312 | + if (!is_object($this->column_path)) { |
| 3313 | + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); |
| 3314 | + } |
| 3315 | + $xfer += $output->writeFieldBegin('column_path', TType::STRUCT, 3); |
| 3316 | + $xfer += $this->column_path->write($output); |
| 3317 | + $xfer += $output->writeFieldEnd(); |
| 3318 | + } |
| 3319 | + if ($this->value !== null) { |
| 3320 | + $xfer += $output->writeFieldBegin('value', TType::STRING, 4); |
| 3321 | + $xfer += $output->writeString($this->value); |
| 3322 | + $xfer += $output->writeFieldEnd(); |
| 3323 | + } |
| 3324 | + if ($this->timestamp !== null) { |
| 3325 | + $xfer += $output->writeFieldBegin('timestamp', TType::I64, 5); |
| 3326 | + $xfer += $output->writeI64($this->timestamp); |
| 3327 | + $xfer += $output->writeFieldEnd(); |
| 3328 | + } |
| 3329 | + if ($this->consistency_level !== null) { |
| 3330 | + $xfer += $output->writeFieldBegin('consistency_level', TType::I32, 6); |
| 3331 | + $xfer += $output->writeI32($this->consistency_level); |
| 3332 | + $xfer += $output->writeFieldEnd(); |
| 3333 | + } |
| 3334 | + $xfer += $output->writeFieldStop(); |
| 3335 | + $xfer += $output->writeStructEnd(); |
| 3336 | + return $xfer; |
| 3337 | + } |
| 3338 | + |
| 3339 | +} |
| 3340 | + |
| 3341 | +class cassandra_Cassandra_insert_result { |
| 3342 | + static $_TSPEC; |
| 3343 | + |
| 3344 | + public $ire = null; |
| 3345 | + public $ue = null; |
| 3346 | + public $te = null; |
| 3347 | + |
| 3348 | + public function __construct($vals=null) { |
| 3349 | + if (!isset(self::$_TSPEC)) { |
| 3350 | + self::$_TSPEC = array( |
| 3351 | + 1 => array( |
| 3352 | + 'var' => 'ire', |
| 3353 | + 'type' => TType::STRUCT, |
| 3354 | + 'class' => 'cassandra_InvalidRequestException', |
| 3355 | + ), |
| 3356 | + 2 => array( |
| 3357 | + 'var' => 'ue', |
| 3358 | + 'type' => TType::STRUCT, |
| 3359 | + 'class' => 'cassandra_UnavailableException', |
| 3360 | + ), |
| 3361 | + 3 => array( |
| 3362 | + 'var' => 'te', |
| 3363 | + 'type' => TType::STRUCT, |
| 3364 | + 'class' => 'cassandra_TimedOutException', |
| 3365 | + ), |
| 3366 | + ); |
| 3367 | + } |
| 3368 | + if (is_array($vals)) { |
| 3369 | + if (isset($vals['ire'])) { |
| 3370 | + $this->ire = $vals['ire']; |
| 3371 | + } |
| 3372 | + if (isset($vals['ue'])) { |
| 3373 | + $this->ue = $vals['ue']; |
| 3374 | + } |
| 3375 | + if (isset($vals['te'])) { |
| 3376 | + $this->te = $vals['te']; |
| 3377 | + } |
| 3378 | + } |
| 3379 | + } |
| 3380 | + |
| 3381 | + public function getName() { |
| 3382 | + return 'Cassandra_insert_result'; |
| 3383 | + } |
| 3384 | + |
| 3385 | + public function read($input) |
| 3386 | + { |
| 3387 | + $xfer = 0; |
| 3388 | + $fname = null; |
| 3389 | + $ftype = 0; |
| 3390 | + $fid = 0; |
| 3391 | + $xfer += $input->readStructBegin($fname); |
| 3392 | + while (true) |
| 3393 | + { |
| 3394 | + $xfer += $input->readFieldBegin($fname, $ftype, $fid); |
| 3395 | + if ($ftype == TType::STOP) { |
| 3396 | + break; |
| 3397 | + } |
| 3398 | + switch ($fid) |
| 3399 | + { |
| 3400 | + case 1: |
| 3401 | + if ($ftype == TType::STRUCT) { |
| 3402 | + $this->ire = new cassandra_InvalidRequestException(); |
| 3403 | + $xfer += $this->ire->read($input); |
| 3404 | + } else { |
| 3405 | + $xfer += $input->skip($ftype); |
| 3406 | + } |
| 3407 | + break; |
| 3408 | + case 2: |
| 3409 | + if ($ftype == TType::STRUCT) { |
| 3410 | + $this->ue = new cassandra_UnavailableException(); |
| 3411 | + $xfer += $this->ue->read($input); |
| 3412 | + } else { |
| 3413 | + $xfer += $input->skip($ftype); |
| 3414 | + } |
| 3415 | + break; |
| 3416 | + case 3: |
| 3417 | + if ($ftype == TType::STRUCT) { |
| 3418 | + $this->te = new cassandra_TimedOutException(); |
| 3419 | + $xfer += $this->te->read($input); |
| 3420 | + } else { |
| 3421 | + $xfer += $input->skip($ftype); |
| 3422 | + } |
| 3423 | + break; |
| 3424 | + default: |
| 3425 | + $xfer += $input->skip($ftype); |
| 3426 | + break; |
| 3427 | + } |
| 3428 | + $xfer += $input->readFieldEnd(); |
| 3429 | + } |
| 3430 | + $xfer += $input->readStructEnd(); |
| 3431 | + return $xfer; |
| 3432 | + } |
| 3433 | + |
| 3434 | + public function write($output) { |
| 3435 | + $xfer = 0; |
| 3436 | + $xfer += $output->writeStructBegin('Cassandra_insert_result'); |
| 3437 | + if ($this->ire !== null) { |
| 3438 | + $xfer += $output->writeFieldBegin('ire', TType::STRUCT, 1); |
| 3439 | + $xfer += $this->ire->write($output); |
| 3440 | + $xfer += $output->writeFieldEnd(); |
| 3441 | + } |
| 3442 | + if ($this->ue !== null) { |
| 3443 | + $xfer += $output->writeFieldBegin('ue', TType::STRUCT, 2); |
| 3444 | + $xfer += $this->ue->write($output); |
| 3445 | + $xfer += $output->writeFieldEnd(); |
| 3446 | + } |
| 3447 | + if ($this->te !== null) { |
| 3448 | + $xfer += $output->writeFieldBegin('te', TType::STRUCT, 3); |
| 3449 | + $xfer += $this->te->write($output); |
| 3450 | + $xfer += $output->writeFieldEnd(); |
| 3451 | + } |
| 3452 | + $xfer += $output->writeFieldStop(); |
| 3453 | + $xfer += $output->writeStructEnd(); |
| 3454 | + return $xfer; |
| 3455 | + } |
| 3456 | + |
| 3457 | +} |
| 3458 | + |
| 3459 | +class cassandra_Cassandra_batch_insert_args { |
| 3460 | + static $_TSPEC; |
| 3461 | + |
| 3462 | + public $keyspace = null; |
| 3463 | + public $key = null; |
| 3464 | + public $cfmap = null; |
| 3465 | + public $consistency_level = 0; |
| 3466 | + |
| 3467 | + public function __construct($vals=null) { |
| 3468 | + if (!isset(self::$_TSPEC)) { |
| 3469 | + self::$_TSPEC = array( |
| 3470 | + 1 => array( |
| 3471 | + 'var' => 'keyspace', |
| 3472 | + 'type' => TType::STRING, |
| 3473 | + ), |
| 3474 | + 2 => array( |
| 3475 | + 'var' => 'key', |
| 3476 | + 'type' => TType::STRING, |
| 3477 | + ), |
| 3478 | + 3 => array( |
| 3479 | + 'var' => 'cfmap', |
| 3480 | + 'type' => TType::MAP, |
| 3481 | + 'ktype' => TType::STRING, |
| 3482 | + 'vtype' => TType::LST, |
| 3483 | + 'key' => array( |
| 3484 | + 'type' => TType::STRING, |
| 3485 | + ), |
| 3486 | + 'val' => array( |
| 3487 | + 'type' => TType::LST, |
| 3488 | + 'etype' => TType::STRUCT, |
| 3489 | + 'elem' => array( |
| 3490 | + 'type' => TType::STRUCT, |
| 3491 | + 'class' => 'cassandra_ColumnOrSuperColumn', |
| 3492 | + ), |
| 3493 | + ), |
| 3494 | + ), |
| 3495 | + 4 => array( |
| 3496 | + 'var' => 'consistency_level', |
| 3497 | + 'type' => TType::I32, |
| 3498 | + ), |
| 3499 | + ); |
| 3500 | + } |
| 3501 | + if (is_array($vals)) { |
| 3502 | + if (isset($vals['keyspace'])) { |
| 3503 | + $this->keyspace = $vals['keyspace']; |
| 3504 | + } |
| 3505 | + if (isset($vals['key'])) { |
| 3506 | + $this->key = $vals['key']; |
| 3507 | + } |
| 3508 | + if (isset($vals['cfmap'])) { |
| 3509 | + $this->cfmap = $vals['cfmap']; |
| 3510 | + } |
| 3511 | + if (isset($vals['consistency_level'])) { |
| 3512 | + $this->consistency_level = $vals['consistency_level']; |
| 3513 | + } |
| 3514 | + } |
| 3515 | + } |
| 3516 | + |
| 3517 | + public function getName() { |
| 3518 | + return 'Cassandra_batch_insert_args'; |
| 3519 | + } |
| 3520 | + |
| 3521 | + public function read($input) |
| 3522 | + { |
| 3523 | + $xfer = 0; |
| 3524 | + $fname = null; |
| 3525 | + $ftype = 0; |
| 3526 | + $fid = 0; |
| 3527 | + $xfer += $input->readStructBegin($fname); |
| 3528 | + while (true) |
| 3529 | + { |
| 3530 | + $xfer += $input->readFieldBegin($fname, $ftype, $fid); |
| 3531 | + if ($ftype == TType::STOP) { |
| 3532 | + break; |
| 3533 | + } |
| 3534 | + switch ($fid) |
| 3535 | + { |
| 3536 | + case 1: |
| 3537 | + if ($ftype == TType::STRING) { |
| 3538 | + $xfer += $input->readString($this->keyspace); |
| 3539 | + } else { |
| 3540 | + $xfer += $input->skip($ftype); |
| 3541 | + } |
| 3542 | + break; |
| 3543 | + case 2: |
| 3544 | + if ($ftype == TType::STRING) { |
| 3545 | + $xfer += $input->readString($this->key); |
| 3546 | + } else { |
| 3547 | + $xfer += $input->skip($ftype); |
| 3548 | + } |
| 3549 | + break; |
| 3550 | + case 3: |
| 3551 | + if ($ftype == TType::MAP) { |
| 3552 | + $this->cfmap = array(); |
| 3553 | + $_size81 = 0; |
| 3554 | + $_ktype82 = 0; |
| 3555 | + $_vtype83 = 0; |
| 3556 | + $xfer += $input->readMapBegin($_ktype82, $_vtype83, $_size81); |
| 3557 | + for ($_i85 = 0; $_i85 < $_size81; ++$_i85) |
| 3558 | + { |
| 3559 | + $key86 = ''; |
| 3560 | + $val87 = array(); |
| 3561 | + $xfer += $input->readString($key86); |
| 3562 | + $val87 = array(); |
| 3563 | + $_size88 = 0; |
| 3564 | + $_etype91 = 0; |
| 3565 | + $xfer += $input->readListBegin($_etype91, $_size88); |
| 3566 | + for ($_i92 = 0; $_i92 < $_size88; ++$_i92) |
| 3567 | + { |
| 3568 | + $elem93 = null; |
| 3569 | + $elem93 = new cassandra_ColumnOrSuperColumn(); |
| 3570 | + $xfer += $elem93->read($input); |
| 3571 | + $val87 []= $elem93; |
| 3572 | + } |
| 3573 | + $xfer += $input->readListEnd(); |
| 3574 | + $this->cfmap[$key86] = $val87; |
| 3575 | + } |
| 3576 | + $xfer += $input->readMapEnd(); |
| 3577 | + } else { |
| 3578 | + $xfer += $input->skip($ftype); |
| 3579 | + } |
| 3580 | + break; |
| 3581 | + case 4: |
| 3582 | + if ($ftype == TType::I32) { |
| 3583 | + $xfer += $input->readI32($this->consistency_level); |
| 3584 | + } else { |
| 3585 | + $xfer += $input->skip($ftype); |
| 3586 | + } |
| 3587 | + break; |
| 3588 | + default: |
| 3589 | + $xfer += $input->skip($ftype); |
| 3590 | + break; |
| 3591 | + } |
| 3592 | + $xfer += $input->readFieldEnd(); |
| 3593 | + } |
| 3594 | + $xfer += $input->readStructEnd(); |
| 3595 | + return $xfer; |
| 3596 | + } |
| 3597 | + |
| 3598 | + public function write($output) { |
| 3599 | + $xfer = 0; |
| 3600 | + $xfer += $output->writeStructBegin('Cassandra_batch_insert_args'); |
| 3601 | + if ($this->keyspace !== null) { |
| 3602 | + $xfer += $output->writeFieldBegin('keyspace', TType::STRING, 1); |
| 3603 | + $xfer += $output->writeString($this->keyspace); |
| 3604 | + $xfer += $output->writeFieldEnd(); |
| 3605 | + } |
| 3606 | + if ($this->key !== null) { |
| 3607 | + $xfer += $output->writeFieldBegin('key', TType::STRING, 2); |
| 3608 | + $xfer += $output->writeString($this->key); |
| 3609 | + $xfer += $output->writeFieldEnd(); |
| 3610 | + } |
| 3611 | + if ($this->cfmap !== null) { |
| 3612 | + if (!is_array($this->cfmap)) { |
| 3613 | + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); |
| 3614 | + } |
| 3615 | + $xfer += $output->writeFieldBegin('cfmap', TType::MAP, 3); |
| 3616 | + { |
| 3617 | + $output->writeMapBegin(TType::STRING, TType::LST, count($this->cfmap)); |
| 3618 | + { |
| 3619 | + foreach ($this->cfmap as $kiter94 => $viter95) |
| 3620 | + { |
| 3621 | + $xfer += $output->writeString($kiter94); |
| 3622 | + { |
| 3623 | + $output->writeListBegin(TType::STRUCT, count($viter95)); |
| 3624 | + { |
| 3625 | + foreach ($viter95 as $iter96) |
| 3626 | + { |
| 3627 | + $xfer += $iter96->write($output); |
| 3628 | + } |
| 3629 | + } |
| 3630 | + $output->writeListEnd(); |
| 3631 | + } |
| 3632 | + } |
| 3633 | + } |
| 3634 | + $output->writeMapEnd(); |
| 3635 | + } |
| 3636 | + $xfer += $output->writeFieldEnd(); |
| 3637 | + } |
| 3638 | + if ($this->consistency_level !== null) { |
| 3639 | + $xfer += $output->writeFieldBegin('consistency_level', TType::I32, 4); |
| 3640 | + $xfer += $output->writeI32($this->consistency_level); |
| 3641 | + $xfer += $output->writeFieldEnd(); |
| 3642 | + } |
| 3643 | + $xfer += $output->writeFieldStop(); |
| 3644 | + $xfer += $output->writeStructEnd(); |
| 3645 | + return $xfer; |
| 3646 | + } |
| 3647 | + |
| 3648 | +} |
| 3649 | + |
| 3650 | +class cassandra_Cassandra_batch_insert_result { |
| 3651 | + static $_TSPEC; |
| 3652 | + |
| 3653 | + public $ire = null; |
| 3654 | + public $ue = null; |
| 3655 | + public $te = null; |
| 3656 | + |
| 3657 | + public function __construct($vals=null) { |
| 3658 | + if (!isset(self::$_TSPEC)) { |
| 3659 | + self::$_TSPEC = array( |
| 3660 | + 1 => array( |
| 3661 | + 'var' => 'ire', |
| 3662 | + 'type' => TType::STRUCT, |
| 3663 | + 'class' => 'cassandra_InvalidRequestException', |
| 3664 | + ), |
| 3665 | + 2 => array( |
| 3666 | + 'var' => 'ue', |
| 3667 | + 'type' => TType::STRUCT, |
| 3668 | + 'class' => 'cassandra_UnavailableException', |
| 3669 | + ), |
| 3670 | + 3 => array( |
| 3671 | + 'var' => 'te', |
| 3672 | + 'type' => TType::STRUCT, |
| 3673 | + 'class' => 'cassandra_TimedOutException', |
| 3674 | + ), |
| 3675 | + ); |
| 3676 | + } |
| 3677 | + if (is_array($vals)) { |
| 3678 | + if (isset($vals['ire'])) { |
| 3679 | + $this->ire = $vals['ire']; |
| 3680 | + } |
| 3681 | + if (isset($vals['ue'])) { |
| 3682 | + $this->ue = $vals['ue']; |
| 3683 | + } |
| 3684 | + if (isset($vals['te'])) { |
| 3685 | + $this->te = $vals['te']; |
| 3686 | + } |
| 3687 | + } |
| 3688 | + } |
| 3689 | + |
| 3690 | + public function getName() { |
| 3691 | + return 'Cassandra_batch_insert_result'; |
| 3692 | + } |
| 3693 | + |
| 3694 | + public function read($input) |
| 3695 | + { |
| 3696 | + $xfer = 0; |
| 3697 | + $fname = null; |
| 3698 | + $ftype = 0; |
| 3699 | + $fid = 0; |
| 3700 | + $xfer += $input->readStructBegin($fname); |
| 3701 | + while (true) |
| 3702 | + { |
| 3703 | + $xfer += $input->readFieldBegin($fname, $ftype, $fid); |
| 3704 | + if ($ftype == TType::STOP) { |
| 3705 | + break; |
| 3706 | + } |
| 3707 | + switch ($fid) |
| 3708 | + { |
| 3709 | + case 1: |
| 3710 | + if ($ftype == TType::STRUCT) { |
| 3711 | + $this->ire = new cassandra_InvalidRequestException(); |
| 3712 | + $xfer += $this->ire->read($input); |
| 3713 | + } else { |
| 3714 | + $xfer += $input->skip($ftype); |
| 3715 | + } |
| 3716 | + break; |
| 3717 | + case 2: |
| 3718 | + if ($ftype == TType::STRUCT) { |
| 3719 | + $this->ue = new cassandra_UnavailableException(); |
| 3720 | + $xfer += $this->ue->read($input); |
| 3721 | + } else { |
| 3722 | + $xfer += $input->skip($ftype); |
| 3723 | + } |
| 3724 | + break; |
| 3725 | + case 3: |
| 3726 | + if ($ftype == TType::STRUCT) { |
| 3727 | + $this->te = new cassandra_TimedOutException(); |
| 3728 | + $xfer += $this->te->read($input); |
| 3729 | + } else { |
| 3730 | + $xfer += $input->skip($ftype); |
| 3731 | + } |
| 3732 | + break; |
| 3733 | + default: |
| 3734 | + $xfer += $input->skip($ftype); |
| 3735 | + break; |
| 3736 | + } |
| 3737 | + $xfer += $input->readFieldEnd(); |
| 3738 | + } |
| 3739 | + $xfer += $input->readStructEnd(); |
| 3740 | + return $xfer; |
| 3741 | + } |
| 3742 | + |
| 3743 | + public function write($output) { |
| 3744 | + $xfer = 0; |
| 3745 | + $xfer += $output->writeStructBegin('Cassandra_batch_insert_result'); |
| 3746 | + if ($this->ire !== null) { |
| 3747 | + $xfer += $output->writeFieldBegin('ire', TType::STRUCT, 1); |
| 3748 | + $xfer += $this->ire->write($output); |
| 3749 | + $xfer += $output->writeFieldEnd(); |
| 3750 | + } |
| 3751 | + if ($this->ue !== null) { |
| 3752 | + $xfer += $output->writeFieldBegin('ue', TType::STRUCT, 2); |
| 3753 | + $xfer += $this->ue->write($output); |
| 3754 | + $xfer += $output->writeFieldEnd(); |
| 3755 | + } |
| 3756 | + if ($this->te !== null) { |
| 3757 | + $xfer += $output->writeFieldBegin('te', TType::STRUCT, 3); |
| 3758 | + $xfer += $this->te->write($output); |
| 3759 | + $xfer += $output->writeFieldEnd(); |
| 3760 | + } |
| 3761 | + $xfer += $output->writeFieldStop(); |
| 3762 | + $xfer += $output->writeStructEnd(); |
| 3763 | + return $xfer; |
| 3764 | + } |
| 3765 | + |
| 3766 | +} |
| 3767 | + |
| 3768 | +class cassandra_Cassandra_remove_args { |
| 3769 | + static $_TSPEC; |
| 3770 | + |
| 3771 | + public $keyspace = null; |
| 3772 | + public $key = null; |
| 3773 | + public $column_path = null; |
| 3774 | + public $timestamp = null; |
| 3775 | + public $consistency_level = 0; |
| 3776 | + |
| 3777 | + public function __construct($vals=null) { |
| 3778 | + if (!isset(self::$_TSPEC)) { |
| 3779 | + self::$_TSPEC = array( |
| 3780 | + 1 => array( |
| 3781 | + 'var' => 'keyspace', |
| 3782 | + 'type' => TType::STRING, |
| 3783 | + ), |
| 3784 | + 2 => array( |
| 3785 | + 'var' => 'key', |
| 3786 | + 'type' => TType::STRING, |
| 3787 | + ), |
| 3788 | + 3 => array( |
| 3789 | + 'var' => 'column_path', |
| 3790 | + 'type' => TType::STRUCT, |
| 3791 | + 'class' => 'cassandra_ColumnPath', |
| 3792 | + ), |
| 3793 | + 4 => array( |
| 3794 | + 'var' => 'timestamp', |
| 3795 | + 'type' => TType::I64, |
| 3796 | + ), |
| 3797 | + 5 => array( |
| 3798 | + 'var' => 'consistency_level', |
| 3799 | + 'type' => TType::I32, |
| 3800 | + ), |
| 3801 | + ); |
| 3802 | + } |
| 3803 | + if (is_array($vals)) { |
| 3804 | + if (isset($vals['keyspace'])) { |
| 3805 | + $this->keyspace = $vals['keyspace']; |
| 3806 | + } |
| 3807 | + if (isset($vals['key'])) { |
| 3808 | + $this->key = $vals['key']; |
| 3809 | + } |
| 3810 | + if (isset($vals['column_path'])) { |
| 3811 | + $this->column_path = $vals['column_path']; |
| 3812 | + } |
| 3813 | + if (isset($vals['timestamp'])) { |
| 3814 | + $this->timestamp = $vals['timestamp']; |
| 3815 | + } |
| 3816 | + if (isset($vals['consistency_level'])) { |
| 3817 | + $this->consistency_level = $vals['consistency_level']; |
| 3818 | + } |
| 3819 | + } |
| 3820 | + } |
| 3821 | + |
| 3822 | + public function getName() { |
| 3823 | + return 'Cassandra_remove_args'; |
| 3824 | + } |
| 3825 | + |
| 3826 | + public function read($input) |
| 3827 | + { |
| 3828 | + $xfer = 0; |
| 3829 | + $fname = null; |
| 3830 | + $ftype = 0; |
| 3831 | + $fid = 0; |
| 3832 | + $xfer += $input->readStructBegin($fname); |
| 3833 | + while (true) |
| 3834 | + { |
| 3835 | + $xfer += $input->readFieldBegin($fname, $ftype, $fid); |
| 3836 | + if ($ftype == TType::STOP) { |
| 3837 | + break; |
| 3838 | + } |
| 3839 | + switch ($fid) |
| 3840 | + { |
| 3841 | + case 1: |
| 3842 | + if ($ftype == TType::STRING) { |
| 3843 | + $xfer += $input->readString($this->keyspace); |
| 3844 | + } else { |
| 3845 | + $xfer += $input->skip($ftype); |
| 3846 | + } |
| 3847 | + break; |
| 3848 | + case 2: |
| 3849 | + if ($ftype == TType::STRING) { |
| 3850 | + $xfer += $input->readString($this->key); |
| 3851 | + } else { |
| 3852 | + $xfer += $input->skip($ftype); |
| 3853 | + } |
| 3854 | + break; |
| 3855 | + case 3: |
| 3856 | + if ($ftype == TType::STRUCT) { |
| 3857 | + $this->column_path = new cassandra_ColumnPath(); |
| 3858 | + $xfer += $this->column_path->read($input); |
| 3859 | + } else { |
| 3860 | + $xfer += $input->skip($ftype); |
| 3861 | + } |
| 3862 | + break; |
| 3863 | + case 4: |
| 3864 | + if ($ftype == TType::I64) { |
| 3865 | + $xfer += $input->readI64($this->timestamp); |
| 3866 | + } else { |
| 3867 | + $xfer += $input->skip($ftype); |
| 3868 | + } |
| 3869 | + break; |
| 3870 | + case 5: |
| 3871 | + if ($ftype == TType::I32) { |
| 3872 | + $xfer += $input->readI32($this->consistency_level); |
| 3873 | + } else { |
| 3874 | + $xfer += $input->skip($ftype); |
| 3875 | + } |
| 3876 | + break; |
| 3877 | + default: |
| 3878 | + $xfer += $input->skip($ftype); |
| 3879 | + break; |
| 3880 | + } |
| 3881 | + $xfer += $input->readFieldEnd(); |
| 3882 | + } |
| 3883 | + $xfer += $input->readStructEnd(); |
| 3884 | + return $xfer; |
| 3885 | + } |
| 3886 | + |
| 3887 | + public function write($output) { |
| 3888 | + $xfer = 0; |
| 3889 | + $xfer += $output->writeStructBegin('Cassandra_remove_args'); |
| 3890 | + if ($this->keyspace !== null) { |
| 3891 | + $xfer += $output->writeFieldBegin('keyspace', TType::STRING, 1); |
| 3892 | + $xfer += $output->writeString($this->keyspace); |
| 3893 | + $xfer += $output->writeFieldEnd(); |
| 3894 | + } |
| 3895 | + if ($this->key !== null) { |
| 3896 | + $xfer += $output->writeFieldBegin('key', TType::STRING, 2); |
| 3897 | + $xfer += $output->writeString($this->key); |
| 3898 | + $xfer += $output->writeFieldEnd(); |
| 3899 | + } |
| 3900 | + if ($this->column_path !== null) { |
| 3901 | + if (!is_object($this->column_path)) { |
| 3902 | + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); |
| 3903 | + } |
| 3904 | + $xfer += $output->writeFieldBegin('column_path', TType::STRUCT, 3); |
| 3905 | + $xfer += $this->column_path->write($output); |
| 3906 | + $xfer += $output->writeFieldEnd(); |
| 3907 | + } |
| 3908 | + if ($this->timestamp !== null) { |
| 3909 | + $xfer += $output->writeFieldBegin('timestamp', TType::I64, 4); |
| 3910 | + $xfer += $output->writeI64($this->timestamp); |
| 3911 | + $xfer += $output->writeFieldEnd(); |
| 3912 | + } |
| 3913 | + if ($this->consistency_level !== null) { |
| 3914 | + $xfer += $output->writeFieldBegin('consistency_level', TType::I32, 5); |
| 3915 | + $xfer += $output->writeI32($this->consistency_level); |
| 3916 | + $xfer += $output->writeFieldEnd(); |
| 3917 | + } |
| 3918 | + $xfer += $output->writeFieldStop(); |
| 3919 | + $xfer += $output->writeStructEnd(); |
| 3920 | + return $xfer; |
| 3921 | + } |
| 3922 | + |
| 3923 | +} |
| 3924 | + |
| 3925 | +class cassandra_Cassandra_remove_result { |
| 3926 | + static $_TSPEC; |
| 3927 | + |
| 3928 | + public $ire = null; |
| 3929 | + public $ue = null; |
| 3930 | + public $te = null; |
| 3931 | + |
| 3932 | + public function __construct($vals=null) { |
| 3933 | + if (!isset(self::$_TSPEC)) { |
| 3934 | + self::$_TSPEC = array( |
| 3935 | + 1 => array( |
| 3936 | + 'var' => 'ire', |
| 3937 | + 'type' => TType::STRUCT, |
| 3938 | + 'class' => 'cassandra_InvalidRequestException', |
| 3939 | + ), |
| 3940 | + 2 => array( |
| 3941 | + 'var' => 'ue', |
| 3942 | + 'type' => TType::STRUCT, |
| 3943 | + 'class' => 'cassandra_UnavailableException', |
| 3944 | + ), |
| 3945 | + 3 => array( |
| 3946 | + 'var' => 'te', |
| 3947 | + 'type' => TType::STRUCT, |
| 3948 | + 'class' => 'cassandra_TimedOutException', |
| 3949 | + ), |
| 3950 | + ); |
| 3951 | + } |
| 3952 | + if (is_array($vals)) { |
| 3953 | + if (isset($vals['ire'])) { |
| 3954 | + $this->ire = $vals['ire']; |
| 3955 | + } |
| 3956 | + if (isset($vals['ue'])) { |
| 3957 | + $this->ue = $vals['ue']; |
| 3958 | + } |
| 3959 | + if (isset($vals['te'])) { |
| 3960 | + $this->te = $vals['te']; |
| 3961 | + } |
| 3962 | + } |
| 3963 | + } |
| 3964 | + |
| 3965 | + public function getName() { |
| 3966 | + return 'Cassandra_remove_result'; |
| 3967 | + } |
| 3968 | + |
| 3969 | + public function read($input) |
| 3970 | + { |
| 3971 | + $xfer = 0; |
| 3972 | + $fname = null; |
| 3973 | + $ftype = 0; |
| 3974 | + $fid = 0; |
| 3975 | + $xfer += $input->readStructBegin($fname); |
| 3976 | + while (true) |
| 3977 | + { |
| 3978 | + $xfer += $input->readFieldBegin($fname, $ftype, $fid); |
| 3979 | + if ($ftype == TType::STOP) { |
| 3980 | + break; |
| 3981 | + } |
| 3982 | + switch ($fid) |
| 3983 | + { |
| 3984 | + case 1: |
| 3985 | + if ($ftype == TType::STRUCT) { |
| 3986 | + $this->ire = new cassandra_InvalidRequestException(); |
| 3987 | + $xfer += $this->ire->read($input); |
| 3988 | + } else { |
| 3989 | + $xfer += $input->skip($ftype); |
| 3990 | + } |
| 3991 | + break; |
| 3992 | + case 2: |
| 3993 | + if ($ftype == TType::STRUCT) { |
| 3994 | + $this->ue = new cassandra_UnavailableException(); |
| 3995 | + $xfer += $this->ue->read($input); |
| 3996 | + } else { |
| 3997 | + $xfer += $input->skip($ftype); |
| 3998 | + } |
| 3999 | + break; |
| 4000 | + case 3: |
| 4001 | + if ($ftype == TType::STRUCT) { |
| 4002 | + $this->te = new cassandra_TimedOutException(); |
| 4003 | + $xfer += $this->te->read($input); |
| 4004 | + } else { |
| 4005 | + $xfer += $input->skip($ftype); |
| 4006 | + } |
| 4007 | + break; |
| 4008 | + default: |
| 4009 | + $xfer += $input->skip($ftype); |
| 4010 | + break; |
| 4011 | + } |
| 4012 | + $xfer += $input->readFieldEnd(); |
| 4013 | + } |
| 4014 | + $xfer += $input->readStructEnd(); |
| 4015 | + return $xfer; |
| 4016 | + } |
| 4017 | + |
| 4018 | + public function write($output) { |
| 4019 | + $xfer = 0; |
| 4020 | + $xfer += $output->writeStructBegin('Cassandra_remove_result'); |
| 4021 | + if ($this->ire !== null) { |
| 4022 | + $xfer += $output->writeFieldBegin('ire', TType::STRUCT, 1); |
| 4023 | + $xfer += $this->ire->write($output); |
| 4024 | + $xfer += $output->writeFieldEnd(); |
| 4025 | + } |
| 4026 | + if ($this->ue !== null) { |
| 4027 | + $xfer += $output->writeFieldBegin('ue', TType::STRUCT, 2); |
| 4028 | + $xfer += $this->ue->write($output); |
| 4029 | + $xfer += $output->writeFieldEnd(); |
| 4030 | + } |
| 4031 | + if ($this->te !== null) { |
| 4032 | + $xfer += $output->writeFieldBegin('te', TType::STRUCT, 3); |
| 4033 | + $xfer += $this->te->write($output); |
| 4034 | + $xfer += $output->writeFieldEnd(); |
| 4035 | + } |
| 4036 | + $xfer += $output->writeFieldStop(); |
| 4037 | + $xfer += $output->writeStructEnd(); |
| 4038 | + return $xfer; |
| 4039 | + } |
| 4040 | + |
| 4041 | +} |
| 4042 | + |
| 4043 | +class cassandra_Cassandra_get_string_property_args { |
| 4044 | + static $_TSPEC; |
| 4045 | + |
| 4046 | + public $property = null; |
| 4047 | + |
| 4048 | + public function __construct($vals=null) { |
| 4049 | + if (!isset(self::$_TSPEC)) { |
| 4050 | + self::$_TSPEC = array( |
| 4051 | + 1 => array( |
| 4052 | + 'var' => 'property', |
| 4053 | + 'type' => TType::STRING, |
| 4054 | + ), |
| 4055 | + ); |
| 4056 | + } |
| 4057 | + if (is_array($vals)) { |
| 4058 | + if (isset($vals['property'])) { |
| 4059 | + $this->property = $vals['property']; |
| 4060 | + } |
| 4061 | + } |
| 4062 | + } |
| 4063 | + |
| 4064 | + public function getName() { |
| 4065 | + return 'Cassandra_get_string_property_args'; |
| 4066 | + } |
| 4067 | + |
| 4068 | + public function read($input) |
| 4069 | + { |
| 4070 | + $xfer = 0; |
| 4071 | + $fname = null; |
| 4072 | + $ftype = 0; |
| 4073 | + $fid = 0; |
| 4074 | + $xfer += $input->readStructBegin($fname); |
| 4075 | + while (true) |
| 4076 | + { |
| 4077 | + $xfer += $input->readFieldBegin($fname, $ftype, $fid); |
| 4078 | + if ($ftype == TType::STOP) { |
| 4079 | + break; |
| 4080 | + } |
| 4081 | + switch ($fid) |
| 4082 | + { |
| 4083 | + case 1: |
| 4084 | + if ($ftype == TType::STRING) { |
| 4085 | + $xfer += $input->readString($this->property); |
| 4086 | + } else { |
| 4087 | + $xfer += $input->skip($ftype); |
| 4088 | + } |
| 4089 | + break; |
| 4090 | + default: |
| 4091 | + $xfer += $input->skip($ftype); |
| 4092 | + break; |
| 4093 | + } |
| 4094 | + $xfer += $input->readFieldEnd(); |
| 4095 | + } |
| 4096 | + $xfer += $input->readStructEnd(); |
| 4097 | + return $xfer; |
| 4098 | + } |
| 4099 | + |
| 4100 | + public function write($output) { |
| 4101 | + $xfer = 0; |
| 4102 | + $xfer += $output->writeStructBegin('Cassandra_get_string_property_args'); |
| 4103 | + if ($this->property !== null) { |
| 4104 | + $xfer += $output->writeFieldBegin('property', TType::STRING, 1); |
| 4105 | + $xfer += $output->writeString($this->property); |
| 4106 | + $xfer += $output->writeFieldEnd(); |
| 4107 | + } |
| 4108 | + $xfer += $output->writeFieldStop(); |
| 4109 | + $xfer += $output->writeStructEnd(); |
| 4110 | + return $xfer; |
| 4111 | + } |
| 4112 | + |
| 4113 | +} |
| 4114 | + |
| 4115 | +class cassandra_Cassandra_get_string_property_result { |
| 4116 | + static $_TSPEC; |
| 4117 | + |
| 4118 | + public $success = null; |
| 4119 | + |
| 4120 | + public function __construct($vals=null) { |
| 4121 | + if (!isset(self::$_TSPEC)) { |
| 4122 | + self::$_TSPEC = array( |
| 4123 | + 0 => array( |
| 4124 | + 'var' => 'success', |
| 4125 | + 'type' => TType::STRING, |
| 4126 | + ), |
| 4127 | + ); |
| 4128 | + } |
| 4129 | + if (is_array($vals)) { |
| 4130 | + if (isset($vals['success'])) { |
| 4131 | + $this->success = $vals['success']; |
| 4132 | + } |
| 4133 | + } |
| 4134 | + } |
| 4135 | + |
| 4136 | + public function getName() { |
| 4137 | + return 'Cassandra_get_string_property_result'; |
| 4138 | + } |
| 4139 | + |
| 4140 | + public function read($input) |
| 4141 | + { |
| 4142 | + $xfer = 0; |
| 4143 | + $fname = null; |
| 4144 | + $ftype = 0; |
| 4145 | + $fid = 0; |
| 4146 | + $xfer += $input->readStructBegin($fname); |
| 4147 | + while (true) |
| 4148 | + { |
| 4149 | + $xfer += $input->readFieldBegin($fname, $ftype, $fid); |
| 4150 | + if ($ftype == TType::STOP) { |
| 4151 | + break; |
| 4152 | + } |
| 4153 | + switch ($fid) |
| 4154 | + { |
| 4155 | + case 0: |
| 4156 | + if ($ftype == TType::STRING) { |
| 4157 | + $xfer += $input->readString($this->success); |
| 4158 | + } else { |
| 4159 | + $xfer += $input->skip($ftype); |
| 4160 | + } |
| 4161 | + break; |
| 4162 | + default: |
| 4163 | + $xfer += $input->skip($ftype); |
| 4164 | + break; |
| 4165 | + } |
| 4166 | + $xfer += $input->readFieldEnd(); |
| 4167 | + } |
| 4168 | + $xfer += $input->readStructEnd(); |
| 4169 | + return $xfer; |
| 4170 | + } |
| 4171 | + |
| 4172 | + public function write($output) { |
| 4173 | + $xfer = 0; |
| 4174 | + $xfer += $output->writeStructBegin('Cassandra_get_string_property_result'); |
| 4175 | + if ($this->success !== null) { |
| 4176 | + $xfer += $output->writeFieldBegin('success', TType::STRING, 0); |
| 4177 | + $xfer += $output->writeString($this->success); |
| 4178 | + $xfer += $output->writeFieldEnd(); |
| 4179 | + } |
| 4180 | + $xfer += $output->writeFieldStop(); |
| 4181 | + $xfer += $output->writeStructEnd(); |
| 4182 | + return $xfer; |
| 4183 | + } |
| 4184 | + |
| 4185 | +} |
| 4186 | + |
| 4187 | +class cassandra_Cassandra_get_string_list_property_args { |
| 4188 | + static $_TSPEC; |
| 4189 | + |
| 4190 | + public $property = null; |
| 4191 | + |
| 4192 | + public function __construct($vals=null) { |
| 4193 | + if (!isset(self::$_TSPEC)) { |
| 4194 | + self::$_TSPEC = array( |
| 4195 | + 1 => array( |
| 4196 | + 'var' => 'property', |
| 4197 | + 'type' => TType::STRING, |
| 4198 | + ), |
| 4199 | + ); |
| 4200 | + } |
| 4201 | + if (is_array($vals)) { |
| 4202 | + if (isset($vals['property'])) { |
| 4203 | + $this->property = $vals['property']; |
| 4204 | + } |
| 4205 | + } |
| 4206 | + } |
| 4207 | + |
| 4208 | + public function getName() { |
| 4209 | + return 'Cassandra_get_string_list_property_args'; |
| 4210 | + } |
| 4211 | + |
| 4212 | + public function read($input) |
| 4213 | + { |
| 4214 | + $xfer = 0; |
| 4215 | + $fname = null; |
| 4216 | + $ftype = 0; |
| 4217 | + $fid = 0; |
| 4218 | + $xfer += $input->readStructBegin($fname); |
| 4219 | + while (true) |
| 4220 | + { |
| 4221 | + $xfer += $input->readFieldBegin($fname, $ftype, $fid); |
| 4222 | + if ($ftype == TType::STOP) { |
| 4223 | + break; |
| 4224 | + } |
| 4225 | + switch ($fid) |
| 4226 | + { |
| 4227 | + case 1: |
| 4228 | + if ($ftype == TType::STRING) { |
| 4229 | + $xfer += $input->readString($this->property); |
| 4230 | + } else { |
| 4231 | + $xfer += $input->skip($ftype); |
| 4232 | + } |
| 4233 | + break; |
| 4234 | + default: |
| 4235 | + $xfer += $input->skip($ftype); |
| 4236 | + break; |
| 4237 | + } |
| 4238 | + $xfer += $input->readFieldEnd(); |
| 4239 | + } |
| 4240 | + $xfer += $input->readStructEnd(); |
| 4241 | + return $xfer; |
| 4242 | + } |
| 4243 | + |
| 4244 | + public function write($output) { |
| 4245 | + $xfer = 0; |
| 4246 | + $xfer += $output->writeStructBegin('Cassandra_get_string_list_property_args'); |
| 4247 | + if ($this->property !== null) { |
| 4248 | + $xfer += $output->writeFieldBegin('property', TType::STRING, 1); |
| 4249 | + $xfer += $output->writeString($this->property); |
| 4250 | + $xfer += $output->writeFieldEnd(); |
| 4251 | + } |
| 4252 | + $xfer += $output->writeFieldStop(); |
| 4253 | + $xfer += $output->writeStructEnd(); |
| 4254 | + return $xfer; |
| 4255 | + } |
| 4256 | + |
| 4257 | +} |
| 4258 | + |
| 4259 | +class cassandra_Cassandra_get_string_list_property_result { |
| 4260 | + static $_TSPEC; |
| 4261 | + |
| 4262 | + public $success = null; |
| 4263 | + |
| 4264 | + public function __construct($vals=null) { |
| 4265 | + if (!isset(self::$_TSPEC)) { |
| 4266 | + self::$_TSPEC = array( |
| 4267 | + 0 => array( |
| 4268 | + 'var' => 'success', |
| 4269 | + 'type' => TType::LST, |
| 4270 | + 'etype' => TType::STRING, |
| 4271 | + 'elem' => array( |
| 4272 | + 'type' => TType::STRING, |
| 4273 | + ), |
| 4274 | + ), |
| 4275 | + ); |
| 4276 | + } |
| 4277 | + if (is_array($vals)) { |
| 4278 | + if (isset($vals['success'])) { |
| 4279 | + $this->success = $vals['success']; |
| 4280 | + } |
| 4281 | + } |
| 4282 | + } |
| 4283 | + |
| 4284 | + public function getName() { |
| 4285 | + return 'Cassandra_get_string_list_property_result'; |
| 4286 | + } |
| 4287 | + |
| 4288 | + public function read($input) |
| 4289 | + { |
| 4290 | + $xfer = 0; |
| 4291 | + $fname = null; |
| 4292 | + $ftype = 0; |
| 4293 | + $fid = 0; |
| 4294 | + $xfer += $input->readStructBegin($fname); |
| 4295 | + while (true) |
| 4296 | + { |
| 4297 | + $xfer += $input->readFieldBegin($fname, $ftype, $fid); |
| 4298 | + if ($ftype == TType::STOP) { |
| 4299 | + break; |
| 4300 | + } |
| 4301 | + switch ($fid) |
| 4302 | + { |
| 4303 | + case 0: |
| 4304 | + if ($ftype == TType::LST) { |
| 4305 | + $this->success = array(); |
| 4306 | + $_size97 = 0; |
| 4307 | + $_etype100 = 0; |
| 4308 | + $xfer += $input->readListBegin($_etype100, $_size97); |
| 4309 | + for ($_i101 = 0; $_i101 < $_size97; ++$_i101) |
| 4310 | + { |
| 4311 | + $elem102 = null; |
| 4312 | + $xfer += $input->readString($elem102); |
| 4313 | + $this->success []= $elem102; |
| 4314 | + } |
| 4315 | + $xfer += $input->readListEnd(); |
| 4316 | + } else { |
| 4317 | + $xfer += $input->skip($ftype); |
| 4318 | + } |
| 4319 | + break; |
| 4320 | + default: |
| 4321 | + $xfer += $input->skip($ftype); |
| 4322 | + break; |
| 4323 | + } |
| 4324 | + $xfer += $input->readFieldEnd(); |
| 4325 | + } |
| 4326 | + $xfer += $input->readStructEnd(); |
| 4327 | + return $xfer; |
| 4328 | + } |
| 4329 | + |
| 4330 | + public function write($output) { |
| 4331 | + $xfer = 0; |
| 4332 | + $xfer += $output->writeStructBegin('Cassandra_get_string_list_property_result'); |
| 4333 | + if ($this->success !== null) { |
| 4334 | + if (!is_array($this->success)) { |
| 4335 | + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); |
| 4336 | + } |
| 4337 | + $xfer += $output->writeFieldBegin('success', TType::LST, 0); |
| 4338 | + { |
| 4339 | + $output->writeListBegin(TType::STRING, count($this->success)); |
| 4340 | + { |
| 4341 | + foreach ($this->success as $iter103) |
| 4342 | + { |
| 4343 | + $xfer += $output->writeString($iter103); |
| 4344 | + } |
| 4345 | + } |
| 4346 | + $output->writeListEnd(); |
| 4347 | + } |
| 4348 | + $xfer += $output->writeFieldEnd(); |
| 4349 | + } |
| 4350 | + $xfer += $output->writeFieldStop(); |
| 4351 | + $xfer += $output->writeStructEnd(); |
| 4352 | + return $xfer; |
| 4353 | + } |
| 4354 | + |
| 4355 | +} |
| 4356 | + |
| 4357 | +class cassandra_Cassandra_describe_keyspace_args { |
| 4358 | + static $_TSPEC; |
| 4359 | + |
| 4360 | + public $keyspace = null; |
| 4361 | + |
| 4362 | + public function __construct($vals=null) { |
| 4363 | + if (!isset(self::$_TSPEC)) { |
| 4364 | + self::$_TSPEC = array( |
| 4365 | + 1 => array( |
| 4366 | + 'var' => 'keyspace', |
| 4367 | + 'type' => TType::STRING, |
| 4368 | + ), |
| 4369 | + ); |
| 4370 | + } |
| 4371 | + if (is_array($vals)) { |
| 4372 | + if (isset($vals['keyspace'])) { |
| 4373 | + $this->keyspace = $vals['keyspace']; |
| 4374 | + } |
| 4375 | + } |
| 4376 | + } |
| 4377 | + |
| 4378 | + public function getName() { |
| 4379 | + return 'Cassandra_describe_keyspace_args'; |
| 4380 | + } |
| 4381 | + |
| 4382 | + public function read($input) |
| 4383 | + { |
| 4384 | + $xfer = 0; |
| 4385 | + $fname = null; |
| 4386 | + $ftype = 0; |
| 4387 | + $fid = 0; |
| 4388 | + $xfer += $input->readStructBegin($fname); |
| 4389 | + while (true) |
| 4390 | + { |
| 4391 | + $xfer += $input->readFieldBegin($fname, $ftype, $fid); |
| 4392 | + if ($ftype == TType::STOP) { |
| 4393 | + break; |
| 4394 | + } |
| 4395 | + switch ($fid) |
| 4396 | + { |
| 4397 | + case 1: |
| 4398 | + if ($ftype == TType::STRING) { |
| 4399 | + $xfer += $input->readString($this->keyspace); |
| 4400 | + } else { |
| 4401 | + $xfer += $input->skip($ftype); |
| 4402 | + } |
| 4403 | + break; |
| 4404 | + default: |
| 4405 | + $xfer += $input->skip($ftype); |
| 4406 | + break; |
| 4407 | + } |
| 4408 | + $xfer += $input->readFieldEnd(); |
| 4409 | + } |
| 4410 | + $xfer += $input->readStructEnd(); |
| 4411 | + return $xfer; |
| 4412 | + } |
| 4413 | + |
| 4414 | + public function write($output) { |
| 4415 | + $xfer = 0; |
| 4416 | + $xfer += $output->writeStructBegin('Cassandra_describe_keyspace_args'); |
| 4417 | + if ($this->keyspace !== null) { |
| 4418 | + $xfer += $output->writeFieldBegin('keyspace', TType::STRING, 1); |
| 4419 | + $xfer += $output->writeString($this->keyspace); |
| 4420 | + $xfer += $output->writeFieldEnd(); |
| 4421 | + } |
| 4422 | + $xfer += $output->writeFieldStop(); |
| 4423 | + $xfer += $output->writeStructEnd(); |
| 4424 | + return $xfer; |
| 4425 | + } |
| 4426 | + |
| 4427 | +} |
| 4428 | + |
| 4429 | +class cassandra_Cassandra_describe_keyspace_result { |
| 4430 | + static $_TSPEC; |
| 4431 | + |
| 4432 | + public $success = null; |
| 4433 | + public $nfe = null; |
| 4434 | + |
| 4435 | + public function __construct($vals=null) { |
| 4436 | + if (!isset(self::$_TSPEC)) { |
| 4437 | + self::$_TSPEC = array( |
| 4438 | + 0 => array( |
| 4439 | + 'var' => 'success', |
| 4440 | + 'type' => TType::MAP, |
| 4441 | + 'ktype' => TType::STRING, |
| 4442 | + 'vtype' => TType::MAP, |
| 4443 | + 'key' => array( |
| 4444 | + 'type' => TType::STRING, |
| 4445 | + ), |
| 4446 | + 'val' => array( |
| 4447 | + 'type' => TType::MAP, |
| 4448 | + 'ktype' => TType::STRING, |
| 4449 | + 'vtype' => TType::STRING, |
| 4450 | + 'key' => array( |
| 4451 | + 'type' => TType::STRING, |
| 4452 | + ), |
| 4453 | + 'val' => array( |
| 4454 | + 'type' => TType::STRING, |
| 4455 | + ), |
| 4456 | + ), |
| 4457 | + ), |
| 4458 | + 1 => array( |
| 4459 | + 'var' => 'nfe', |
| 4460 | + 'type' => TType::STRUCT, |
| 4461 | + 'class' => 'cassandra_NotFoundException', |
| 4462 | + ), |
| 4463 | + ); |
| 4464 | + } |
| 4465 | + if (is_array($vals)) { |
| 4466 | + if (isset($vals['success'])) { |
| 4467 | + $this->success = $vals['success']; |
| 4468 | + } |
| 4469 | + if (isset($vals['nfe'])) { |
| 4470 | + $this->nfe = $vals['nfe']; |
| 4471 | + } |
| 4472 | + } |
| 4473 | + } |
| 4474 | + |
| 4475 | + public function getName() { |
| 4476 | + return 'Cassandra_describe_keyspace_result'; |
| 4477 | + } |
| 4478 | + |
| 4479 | + public function read($input) |
| 4480 | + { |
| 4481 | + $xfer = 0; |
| 4482 | + $fname = null; |
| 4483 | + $ftype = 0; |
| 4484 | + $fid = 0; |
| 4485 | + $xfer += $input->readStructBegin($fname); |
| 4486 | + while (true) |
| 4487 | + { |
| 4488 | + $xfer += $input->readFieldBegin($fname, $ftype, $fid); |
| 4489 | + if ($ftype == TType::STOP) { |
| 4490 | + break; |
| 4491 | + } |
| 4492 | + switch ($fid) |
| 4493 | + { |
| 4494 | + case 0: |
| 4495 | + if ($ftype == TType::MAP) { |
| 4496 | + $this->success = array(); |
| 4497 | + $_size104 = 0; |
| 4498 | + $_ktype105 = 0; |
| 4499 | + $_vtype106 = 0; |
| 4500 | + $xfer += $input->readMapBegin($_ktype105, $_vtype106, $_size104); |
| 4501 | + for ($_i108 = 0; $_i108 < $_size104; ++$_i108) |
| 4502 | + { |
| 4503 | + $key109 = ''; |
| 4504 | + $val110 = array(); |
| 4505 | + $xfer += $input->readString($key109); |
| 4506 | + $val110 = array(); |
| 4507 | + $_size111 = 0; |
| 4508 | + $_ktype112 = 0; |
| 4509 | + $_vtype113 = 0; |
| 4510 | + $xfer += $input->readMapBegin($_ktype112, $_vtype113, $_size111); |
| 4511 | + for ($_i115 = 0; $_i115 < $_size111; ++$_i115) |
| 4512 | + { |
| 4513 | + $key116 = ''; |
| 4514 | + $val117 = ''; |
| 4515 | + $xfer += $input->readString($key116); |
| 4516 | + $xfer += $input->readString($val117); |
| 4517 | + $val110[$key116] = $val117; |
| 4518 | + } |
| 4519 | + $xfer += $input->readMapEnd(); |
| 4520 | + $this->success[$key109] = $val110; |
| 4521 | + } |
| 4522 | + $xfer += $input->readMapEnd(); |
| 4523 | + } else { |
| 4524 | + $xfer += $input->skip($ftype); |
| 4525 | + } |
| 4526 | + break; |
| 4527 | + case 1: |
| 4528 | + if ($ftype == TType::STRUCT) { |
| 4529 | + $this->nfe = new cassandra_NotFoundException(); |
| 4530 | + $xfer += $this->nfe->read($input); |
| 4531 | + } else { |
| 4532 | + $xfer += $input->skip($ftype); |
| 4533 | + } |
| 4534 | + break; |
| 4535 | + default: |
| 4536 | + $xfer += $input->skip($ftype); |
| 4537 | + break; |
| 4538 | + } |
| 4539 | + $xfer += $input->readFieldEnd(); |
| 4540 | + } |
| 4541 | + $xfer += $input->readStructEnd(); |
| 4542 | + return $xfer; |
| 4543 | + } |
| 4544 | + |
| 4545 | + public function write($output) { |
| 4546 | + $xfer = 0; |
| 4547 | + $xfer += $output->writeStructBegin('Cassandra_describe_keyspace_result'); |
| 4548 | + if ($this->success !== null) { |
| 4549 | + if (!is_array($this->success)) { |
| 4550 | + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); |
| 4551 | + } |
| 4552 | + $xfer += $output->writeFieldBegin('success', TType::MAP, 0); |
| 4553 | + { |
| 4554 | + $output->writeMapBegin(TType::STRING, TType::MAP, count($this->success)); |
| 4555 | + { |
| 4556 | + foreach ($this->success as $kiter118 => $viter119) |
| 4557 | + { |
| 4558 | + $xfer += $output->writeString($kiter118); |
| 4559 | + { |
| 4560 | + $output->writeMapBegin(TType::STRING, TType::STRING, count($viter119)); |
| 4561 | + { |
| 4562 | + foreach ($viter119 as $kiter120 => $viter121) |
| 4563 | + { |
| 4564 | + $xfer += $output->writeString($kiter120); |
| 4565 | + $xfer += $output->writeString($viter121); |
| 4566 | + } |
| 4567 | + } |
| 4568 | + $output->writeMapEnd(); |
| 4569 | + } |
| 4570 | + } |
| 4571 | + } |
| 4572 | + $output->writeMapEnd(); |
| 4573 | + } |
| 4574 | + $xfer += $output->writeFieldEnd(); |
| 4575 | + } |
| 4576 | + if ($this->nfe !== null) { |
| 4577 | + $xfer += $output->writeFieldBegin('nfe', TType::STRUCT, 1); |
| 4578 | + $xfer += $this->nfe->write($output); |
| 4579 | + $xfer += $output->writeFieldEnd(); |
| 4580 | + } |
| 4581 | + $xfer += $output->writeFieldStop(); |
| 4582 | + $xfer += $output->writeStructEnd(); |
| 4583 | + return $xfer; |
| 4584 | + } |
| 4585 | + |
| 4586 | +} |
| 4587 | + |
| 4588 | +?> |
\ No newline at end of file |
Property changes on: trunk/extensions/Cassandra/lib/Cassandra.php |
___________________________________________________________________ |
Name: svn:eol-style |
1 | 4589 | + native |
Index: trunk/extensions/Cassandra/lib/cassandra_types.php |
— | — | @@ -0,0 +1,1171 @@ |
| 2 | +<?php |
| 3 | +/** |
| 4 | + * Autogenerated by Thrift |
| 5 | + * |
| 6 | + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING |
| 7 | + */ |
| 8 | +include_once $GLOBALS['THRIFT_ROOT'].'/Thrift.php'; |
| 9 | + |
| 10 | + |
| 11 | +$GLOBALS['cassandra_E_ConsistencyLevel'] = array( |
| 12 | + 'ZERO' => 0, |
| 13 | + 'ONE' => 1, |
| 14 | + 'QUORUM' => 2, |
| 15 | + 'DCQUORUM' => 3, |
| 16 | + 'DCQUORUMSYNC' => 4, |
| 17 | + 'ALL' => 5, |
| 18 | +); |
| 19 | + |
| 20 | +final class cassandra_ConsistencyLevel { |
| 21 | + const ZERO = 0; |
| 22 | + const ONE = 1; |
| 23 | + const QUORUM = 2; |
| 24 | + const DCQUORUM = 3; |
| 25 | + const DCQUORUMSYNC = 4; |
| 26 | + const ALL = 5; |
| 27 | + static public $__names = array( |
| 28 | + 0 => 'ZERO', |
| 29 | + 1 => 'ONE', |
| 30 | + 2 => 'QUORUM', |
| 31 | + 3 => 'DCQUORUM', |
| 32 | + 4 => 'DCQUORUMSYNC', |
| 33 | + 5 => 'ALL', |
| 34 | + ); |
| 35 | +} |
| 36 | + |
| 37 | +class cassandra_Column { |
| 38 | + static $_TSPEC; |
| 39 | + |
| 40 | + public $name = null; |
| 41 | + public $value = null; |
| 42 | + public $timestamp = null; |
| 43 | + |
| 44 | + public function __construct($vals=null) { |
| 45 | + if (!isset(self::$_TSPEC)) { |
| 46 | + self::$_TSPEC = array( |
| 47 | + 1 => array( |
| 48 | + 'var' => 'name', |
| 49 | + 'type' => TType::STRING, |
| 50 | + ), |
| 51 | + 2 => array( |
| 52 | + 'var' => 'value', |
| 53 | + 'type' => TType::STRING, |
| 54 | + ), |
| 55 | + 3 => array( |
| 56 | + 'var' => 'timestamp', |
| 57 | + 'type' => TType::I64, |
| 58 | + ), |
| 59 | + ); |
| 60 | + } |
| 61 | + if (is_array($vals)) { |
| 62 | + if (isset($vals['name'])) { |
| 63 | + $this->name = $vals['name']; |
| 64 | + } |
| 65 | + if (isset($vals['value'])) { |
| 66 | + $this->value = $vals['value']; |
| 67 | + } |
| 68 | + if (isset($vals['timestamp'])) { |
| 69 | + $this->timestamp = $vals['timestamp']; |
| 70 | + } |
| 71 | + } |
| 72 | + } |
| 73 | + |
| 74 | + public function getName() { |
| 75 | + return 'Column'; |
| 76 | + } |
| 77 | + |
| 78 | + public function read($input) |
| 79 | + { |
| 80 | + $xfer = 0; |
| 81 | + $fname = null; |
| 82 | + $ftype = 0; |
| 83 | + $fid = 0; |
| 84 | + $xfer += $input->readStructBegin($fname); |
| 85 | + while (true) |
| 86 | + { |
| 87 | + $xfer += $input->readFieldBegin($fname, $ftype, $fid); |
| 88 | + if ($ftype == TType::STOP) { |
| 89 | + break; |
| 90 | + } |
| 91 | + switch ($fid) |
| 92 | + { |
| 93 | + case 1: |
| 94 | + if ($ftype == TType::STRING) { |
| 95 | + $xfer += $input->readString($this->name); |
| 96 | + } else { |
| 97 | + $xfer += $input->skip($ftype); |
| 98 | + } |
| 99 | + break; |
| 100 | + case 2: |
| 101 | + if ($ftype == TType::STRING) { |
| 102 | + $xfer += $input->readString($this->value); |
| 103 | + } else { |
| 104 | + $xfer += $input->skip($ftype); |
| 105 | + } |
| 106 | + break; |
| 107 | + case 3: |
| 108 | + if ($ftype == TType::I64) { |
| 109 | + $xfer += $input->readI64($this->timestamp); |
| 110 | + } else { |
| 111 | + $xfer += $input->skip($ftype); |
| 112 | + } |
| 113 | + break; |
| 114 | + default: |
| 115 | + $xfer += $input->skip($ftype); |
| 116 | + break; |
| 117 | + } |
| 118 | + $xfer += $input->readFieldEnd(); |
| 119 | + } |
| 120 | + $xfer += $input->readStructEnd(); |
| 121 | + return $xfer; |
| 122 | + } |
| 123 | + |
| 124 | + public function write($output) { |
| 125 | + $xfer = 0; |
| 126 | + $xfer += $output->writeStructBegin('Column'); |
| 127 | + if ($this->name !== null) { |
| 128 | + $xfer += $output->writeFieldBegin('name', TType::STRING, 1); |
| 129 | + $xfer += $output->writeString($this->name); |
| 130 | + $xfer += $output->writeFieldEnd(); |
| 131 | + } |
| 132 | + if ($this->value !== null) { |
| 133 | + $xfer += $output->writeFieldBegin('value', TType::STRING, 2); |
| 134 | + $xfer += $output->writeString($this->value); |
| 135 | + $xfer += $output->writeFieldEnd(); |
| 136 | + } |
| 137 | + if ($this->timestamp !== null) { |
| 138 | + $xfer += $output->writeFieldBegin('timestamp', TType::I64, 3); |
| 139 | + $xfer += $output->writeI64($this->timestamp); |
| 140 | + $xfer += $output->writeFieldEnd(); |
| 141 | + } |
| 142 | + $xfer += $output->writeFieldStop(); |
| 143 | + $xfer += $output->writeStructEnd(); |
| 144 | + return $xfer; |
| 145 | + } |
| 146 | + |
| 147 | +} |
| 148 | + |
| 149 | +class cassandra_SuperColumn { |
| 150 | + static $_TSPEC; |
| 151 | + |
| 152 | + public $name = null; |
| 153 | + public $columns = null; |
| 154 | + |
| 155 | + public function __construct($vals=null) { |
| 156 | + if (!isset(self::$_TSPEC)) { |
| 157 | + self::$_TSPEC = array( |
| 158 | + 1 => array( |
| 159 | + 'var' => 'name', |
| 160 | + 'type' => TType::STRING, |
| 161 | + ), |
| 162 | + 2 => array( |
| 163 | + 'var' => 'columns', |
| 164 | + 'type' => TType::LST, |
| 165 | + 'etype' => TType::STRUCT, |
| 166 | + 'elem' => array( |
| 167 | + 'type' => TType::STRUCT, |
| 168 | + 'class' => 'cassandra_Column', |
| 169 | + ), |
| 170 | + ), |
| 171 | + ); |
| 172 | + } |
| 173 | + if (is_array($vals)) { |
| 174 | + if (isset($vals['name'])) { |
| 175 | + $this->name = $vals['name']; |
| 176 | + } |
| 177 | + if (isset($vals['columns'])) { |
| 178 | + $this->columns = $vals['columns']; |
| 179 | + } |
| 180 | + } |
| 181 | + } |
| 182 | + |
| 183 | + public function getName() { |
| 184 | + return 'SuperColumn'; |
| 185 | + } |
| 186 | + |
| 187 | + public function read($input) |
| 188 | + { |
| 189 | + $xfer = 0; |
| 190 | + $fname = null; |
| 191 | + $ftype = 0; |
| 192 | + $fid = 0; |
| 193 | + $xfer += $input->readStructBegin($fname); |
| 194 | + while (true) |
| 195 | + { |
| 196 | + $xfer += $input->readFieldBegin($fname, $ftype, $fid); |
| 197 | + if ($ftype == TType::STOP) { |
| 198 | + break; |
| 199 | + } |
| 200 | + switch ($fid) |
| 201 | + { |
| 202 | + case 1: |
| 203 | + if ($ftype == TType::STRING) { |
| 204 | + $xfer += $input->readString($this->name); |
| 205 | + } else { |
| 206 | + $xfer += $input->skip($ftype); |
| 207 | + } |
| 208 | + break; |
| 209 | + case 2: |
| 210 | + if ($ftype == TType::LST) { |
| 211 | + $this->columns = array(); |
| 212 | + $_size0 = 0; |
| 213 | + $_etype3 = 0; |
| 214 | + $xfer += $input->readListBegin($_etype3, $_size0); |
| 215 | + for ($_i4 = 0; $_i4 < $_size0; ++$_i4) |
| 216 | + { |
| 217 | + $elem5 = null; |
| 218 | + $elem5 = new cassandra_Column(); |
| 219 | + $xfer += $elem5->read($input); |
| 220 | + $this->columns []= $elem5; |
| 221 | + } |
| 222 | + $xfer += $input->readListEnd(); |
| 223 | + } else { |
| 224 | + $xfer += $input->skip($ftype); |
| 225 | + } |
| 226 | + break; |
| 227 | + default: |
| 228 | + $xfer += $input->skip($ftype); |
| 229 | + break; |
| 230 | + } |
| 231 | + $xfer += $input->readFieldEnd(); |
| 232 | + } |
| 233 | + $xfer += $input->readStructEnd(); |
| 234 | + return $xfer; |
| 235 | + } |
| 236 | + |
| 237 | + public function write($output) { |
| 238 | + $xfer = 0; |
| 239 | + $xfer += $output->writeStructBegin('SuperColumn'); |
| 240 | + if ($this->name !== null) { |
| 241 | + $xfer += $output->writeFieldBegin('name', TType::STRING, 1); |
| 242 | + $xfer += $output->writeString($this->name); |
| 243 | + $xfer += $output->writeFieldEnd(); |
| 244 | + } |
| 245 | + if ($this->columns !== null) { |
| 246 | + if (!is_array($this->columns)) { |
| 247 | + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); |
| 248 | + } |
| 249 | + $xfer += $output->writeFieldBegin('columns', TType::LST, 2); |
| 250 | + { |
| 251 | + $output->writeListBegin(TType::STRUCT, count($this->columns)); |
| 252 | + { |
| 253 | + foreach ($this->columns as $iter6) |
| 254 | + { |
| 255 | + $xfer += $iter6->write($output); |
| 256 | + } |
| 257 | + } |
| 258 | + $output->writeListEnd(); |
| 259 | + } |
| 260 | + $xfer += $output->writeFieldEnd(); |
| 261 | + } |
| 262 | + $xfer += $output->writeFieldStop(); |
| 263 | + $xfer += $output->writeStructEnd(); |
| 264 | + return $xfer; |
| 265 | + } |
| 266 | + |
| 267 | +} |
| 268 | + |
| 269 | +class cassandra_ColumnOrSuperColumn { |
| 270 | + static $_TSPEC; |
| 271 | + |
| 272 | + public $column = null; |
| 273 | + public $super_column = null; |
| 274 | + |
| 275 | + public function __construct($vals=null) { |
| 276 | + if (!isset(self::$_TSPEC)) { |
| 277 | + self::$_TSPEC = array( |
| 278 | + 1 => array( |
| 279 | + 'var' => 'column', |
| 280 | + 'type' => TType::STRUCT, |
| 281 | + 'class' => 'cassandra_Column', |
| 282 | + ), |
| 283 | + 2 => array( |
| 284 | + 'var' => 'super_column', |
| 285 | + 'type' => TType::STRUCT, |
| 286 | + 'class' => 'cassandra_SuperColumn', |
| 287 | + ), |
| 288 | + ); |
| 289 | + } |
| 290 | + if (is_array($vals)) { |
| 291 | + if (isset($vals['column'])) { |
| 292 | + $this->column = $vals['column']; |
| 293 | + } |
| 294 | + if (isset($vals['super_column'])) { |
| 295 | + $this->super_column = $vals['super_column']; |
| 296 | + } |
| 297 | + } |
| 298 | + } |
| 299 | + |
| 300 | + public function getName() { |
| 301 | + return 'ColumnOrSuperColumn'; |
| 302 | + } |
| 303 | + |
| 304 | + public function read($input) |
| 305 | + { |
| 306 | + $xfer = 0; |
| 307 | + $fname = null; |
| 308 | + $ftype = 0; |
| 309 | + $fid = 0; |
| 310 | + $xfer += $input->readStructBegin($fname); |
| 311 | + while (true) |
| 312 | + { |
| 313 | + $xfer += $input->readFieldBegin($fname, $ftype, $fid); |
| 314 | + if ($ftype == TType::STOP) { |
| 315 | + break; |
| 316 | + } |
| 317 | + switch ($fid) |
| 318 | + { |
| 319 | + case 1: |
| 320 | + if ($ftype == TType::STRUCT) { |
| 321 | + $this->column = new cassandra_Column(); |
| 322 | + $xfer += $this->column->read($input); |
| 323 | + } else { |
| 324 | + $xfer += $input->skip($ftype); |
| 325 | + } |
| 326 | + break; |
| 327 | + case 2: |
| 328 | + if ($ftype == TType::STRUCT) { |
| 329 | + $this->super_column = new cassandra_SuperColumn(); |
| 330 | + $xfer += $this->super_column->read($input); |
| 331 | + } else { |
| 332 | + $xfer += $input->skip($ftype); |
| 333 | + } |
| 334 | + break; |
| 335 | + default: |
| 336 | + $xfer += $input->skip($ftype); |
| 337 | + break; |
| 338 | + } |
| 339 | + $xfer += $input->readFieldEnd(); |
| 340 | + } |
| 341 | + $xfer += $input->readStructEnd(); |
| 342 | + return $xfer; |
| 343 | + } |
| 344 | + |
| 345 | + public function write($output) { |
| 346 | + $xfer = 0; |
| 347 | + $xfer += $output->writeStructBegin('ColumnOrSuperColumn'); |
| 348 | + if ($this->column !== null) { |
| 349 | + if (!is_object($this->column)) { |
| 350 | + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); |
| 351 | + } |
| 352 | + $xfer += $output->writeFieldBegin('column', TType::STRUCT, 1); |
| 353 | + $xfer += $this->column->write($output); |
| 354 | + $xfer += $output->writeFieldEnd(); |
| 355 | + } |
| 356 | + if ($this->super_column !== null) { |
| 357 | + if (!is_object($this->super_column)) { |
| 358 | + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); |
| 359 | + } |
| 360 | + $xfer += $output->writeFieldBegin('super_column', TType::STRUCT, 2); |
| 361 | + $xfer += $this->super_column->write($output); |
| 362 | + $xfer += $output->writeFieldEnd(); |
| 363 | + } |
| 364 | + $xfer += $output->writeFieldStop(); |
| 365 | + $xfer += $output->writeStructEnd(); |
| 366 | + return $xfer; |
| 367 | + } |
| 368 | + |
| 369 | +} |
| 370 | + |
| 371 | +class cassandra_NotFoundException extends TException { |
| 372 | + static $_TSPEC; |
| 373 | + |
| 374 | + |
| 375 | + public function __construct() { |
| 376 | + if (!isset(self::$_TSPEC)) { |
| 377 | + self::$_TSPEC = array( |
| 378 | + ); |
| 379 | + } |
| 380 | + } |
| 381 | + |
| 382 | + public function getName() { |
| 383 | + return 'NotFoundException'; |
| 384 | + } |
| 385 | + |
| 386 | + public function read($input) |
| 387 | + { |
| 388 | + $xfer = 0; |
| 389 | + $fname = null; |
| 390 | + $ftype = 0; |
| 391 | + $fid = 0; |
| 392 | + $xfer += $input->readStructBegin($fname); |
| 393 | + while (true) |
| 394 | + { |
| 395 | + $xfer += $input->readFieldBegin($fname, $ftype, $fid); |
| 396 | + if ($ftype == TType::STOP) { |
| 397 | + break; |
| 398 | + } |
| 399 | + switch ($fid) |
| 400 | + { |
| 401 | + default: |
| 402 | + $xfer += $input->skip($ftype); |
| 403 | + break; |
| 404 | + } |
| 405 | + $xfer += $input->readFieldEnd(); |
| 406 | + } |
| 407 | + $xfer += $input->readStructEnd(); |
| 408 | + return $xfer; |
| 409 | + } |
| 410 | + |
| 411 | + public function write($output) { |
| 412 | + $xfer = 0; |
| 413 | + $xfer += $output->writeStructBegin('NotFoundException'); |
| 414 | + $xfer += $output->writeFieldStop(); |
| 415 | + $xfer += $output->writeStructEnd(); |
| 416 | + return $xfer; |
| 417 | + } |
| 418 | + |
| 419 | +} |
| 420 | + |
| 421 | +class cassandra_InvalidRequestException extends TException { |
| 422 | + static $_TSPEC; |
| 423 | + |
| 424 | + public $why = null; |
| 425 | + |
| 426 | + public function __construct($vals=null) { |
| 427 | + if (!isset(self::$_TSPEC)) { |
| 428 | + self::$_TSPEC = array( |
| 429 | + 1 => array( |
| 430 | + 'var' => 'why', |
| 431 | + 'type' => TType::STRING, |
| 432 | + ), |
| 433 | + ); |
| 434 | + } |
| 435 | + if (is_array($vals)) { |
| 436 | + if (isset($vals['why'])) { |
| 437 | + $this->why = $vals['why']; |
| 438 | + } |
| 439 | + } |
| 440 | + } |
| 441 | + |
| 442 | + public function getName() { |
| 443 | + return 'InvalidRequestException'; |
| 444 | + } |
| 445 | + |
| 446 | + public function read($input) |
| 447 | + { |
| 448 | + $xfer = 0; |
| 449 | + $fname = null; |
| 450 | + $ftype = 0; |
| 451 | + $fid = 0; |
| 452 | + $xfer += $input->readStructBegin($fname); |
| 453 | + while (true) |
| 454 | + { |
| 455 | + $xfer += $input->readFieldBegin($fname, $ftype, $fid); |
| 456 | + if ($ftype == TType::STOP) { |
| 457 | + break; |
| 458 | + } |
| 459 | + switch ($fid) |
| 460 | + { |
| 461 | + case 1: |
| 462 | + if ($ftype == TType::STRING) { |
| 463 | + $xfer += $input->readString($this->why); |
| 464 | + } else { |
| 465 | + $xfer += $input->skip($ftype); |
| 466 | + } |
| 467 | + break; |
| 468 | + default: |
| 469 | + $xfer += $input->skip($ftype); |
| 470 | + break; |
| 471 | + } |
| 472 | + $xfer += $input->readFieldEnd(); |
| 473 | + } |
| 474 | + $xfer += $input->readStructEnd(); |
| 475 | + return $xfer; |
| 476 | + } |
| 477 | + |
| 478 | + public function write($output) { |
| 479 | + $xfer = 0; |
| 480 | + $xfer += $output->writeStructBegin('InvalidRequestException'); |
| 481 | + if ($this->why !== null) { |
| 482 | + $xfer += $output->writeFieldBegin('why', TType::STRING, 1); |
| 483 | + $xfer += $output->writeString($this->why); |
| 484 | + $xfer += $output->writeFieldEnd(); |
| 485 | + } |
| 486 | + $xfer += $output->writeFieldStop(); |
| 487 | + $xfer += $output->writeStructEnd(); |
| 488 | + return $xfer; |
| 489 | + } |
| 490 | + |
| 491 | +} |
| 492 | + |
| 493 | +class cassandra_UnavailableException extends TException { |
| 494 | + static $_TSPEC; |
| 495 | + |
| 496 | + |
| 497 | + public function __construct() { |
| 498 | + if (!isset(self::$_TSPEC)) { |
| 499 | + self::$_TSPEC = array( |
| 500 | + ); |
| 501 | + } |
| 502 | + } |
| 503 | + |
| 504 | + public function getName() { |
| 505 | + return 'UnavailableException'; |
| 506 | + } |
| 507 | + |
| 508 | + public function read($input) |
| 509 | + { |
| 510 | + $xfer = 0; |
| 511 | + $fname = null; |
| 512 | + $ftype = 0; |
| 513 | + $fid = 0; |
| 514 | + $xfer += $input->readStructBegin($fname); |
| 515 | + while (true) |
| 516 | + { |
| 517 | + $xfer += $input->readFieldBegin($fname, $ftype, $fid); |
| 518 | + if ($ftype == TType::STOP) { |
| 519 | + break; |
| 520 | + } |
| 521 | + switch ($fid) |
| 522 | + { |
| 523 | + default: |
| 524 | + $xfer += $input->skip($ftype); |
| 525 | + break; |
| 526 | + } |
| 527 | + $xfer += $input->readFieldEnd(); |
| 528 | + } |
| 529 | + $xfer += $input->readStructEnd(); |
| 530 | + return $xfer; |
| 531 | + } |
| 532 | + |
| 533 | + public function write($output) { |
| 534 | + $xfer = 0; |
| 535 | + $xfer += $output->writeStructBegin('UnavailableException'); |
| 536 | + $xfer += $output->writeFieldStop(); |
| 537 | + $xfer += $output->writeStructEnd(); |
| 538 | + return $xfer; |
| 539 | + } |
| 540 | + |
| 541 | +} |
| 542 | + |
| 543 | +class cassandra_TimedOutException extends TException { |
| 544 | + static $_TSPEC; |
| 545 | + |
| 546 | + |
| 547 | + public function __construct() { |
| 548 | + if (!isset(self::$_TSPEC)) { |
| 549 | + self::$_TSPEC = array( |
| 550 | + ); |
| 551 | + } |
| 552 | + } |
| 553 | + |
| 554 | + public function getName() { |
| 555 | + return 'TimedOutException'; |
| 556 | + } |
| 557 | + |
| 558 | + public function read($input) |
| 559 | + { |
| 560 | + $xfer = 0; |
| 561 | + $fname = null; |
| 562 | + $ftype = 0; |
| 563 | + $fid = 0; |
| 564 | + $xfer += $input->readStructBegin($fname); |
| 565 | + while (true) |
| 566 | + { |
| 567 | + $xfer += $input->readFieldBegin($fname, $ftype, $fid); |
| 568 | + if ($ftype == TType::STOP) { |
| 569 | + break; |
| 570 | + } |
| 571 | + switch ($fid) |
| 572 | + { |
| 573 | + default: |
| 574 | + $xfer += $input->skip($ftype); |
| 575 | + break; |
| 576 | + } |
| 577 | + $xfer += $input->readFieldEnd(); |
| 578 | + } |
| 579 | + $xfer += $input->readStructEnd(); |
| 580 | + return $xfer; |
| 581 | + } |
| 582 | + |
| 583 | + public function write($output) { |
| 584 | + $xfer = 0; |
| 585 | + $xfer += $output->writeStructBegin('TimedOutException'); |
| 586 | + $xfer += $output->writeFieldStop(); |
| 587 | + $xfer += $output->writeStructEnd(); |
| 588 | + return $xfer; |
| 589 | + } |
| 590 | + |
| 591 | +} |
| 592 | + |
| 593 | +class cassandra_ColumnParent { |
| 594 | + static $_TSPEC; |
| 595 | + |
| 596 | + public $column_family = null; |
| 597 | + public $super_column = null; |
| 598 | + |
| 599 | + public function __construct($vals=null) { |
| 600 | + if (!isset(self::$_TSPEC)) { |
| 601 | + self::$_TSPEC = array( |
| 602 | + 3 => array( |
| 603 | + 'var' => 'column_family', |
| 604 | + 'type' => TType::STRING, |
| 605 | + ), |
| 606 | + 4 => array( |
| 607 | + 'var' => 'super_column', |
| 608 | + 'type' => TType::STRING, |
| 609 | + ), |
| 610 | + ); |
| 611 | + } |
| 612 | + if (is_array($vals)) { |
| 613 | + if (isset($vals['column_family'])) { |
| 614 | + $this->column_family = $vals['column_family']; |
| 615 | + } |
| 616 | + if (isset($vals['super_column'])) { |
| 617 | + $this->super_column = $vals['super_column']; |
| 618 | + } |
| 619 | + } |
| 620 | + } |
| 621 | + |
| 622 | + public function getName() { |
| 623 | + return 'ColumnParent'; |
| 624 | + } |
| 625 | + |
| 626 | + public function read($input) |
| 627 | + { |
| 628 | + $xfer = 0; |
| 629 | + $fname = null; |
| 630 | + $ftype = 0; |
| 631 | + $fid = 0; |
| 632 | + $xfer += $input->readStructBegin($fname); |
| 633 | + while (true) |
| 634 | + { |
| 635 | + $xfer += $input->readFieldBegin($fname, $ftype, $fid); |
| 636 | + if ($ftype == TType::STOP) { |
| 637 | + break; |
| 638 | + } |
| 639 | + switch ($fid) |
| 640 | + { |
| 641 | + case 3: |
| 642 | + if ($ftype == TType::STRING) { |
| 643 | + $xfer += $input->readString($this->column_family); |
| 644 | + } else { |
| 645 | + $xfer += $input->skip($ftype); |
| 646 | + } |
| 647 | + break; |
| 648 | + case 4: |
| 649 | + if ($ftype == TType::STRING) { |
| 650 | + $xfer += $input->readString($this->super_column); |
| 651 | + } else { |
| 652 | + $xfer += $input->skip($ftype); |
| 653 | + } |
| 654 | + break; |
| 655 | + default: |
| 656 | + $xfer += $input->skip($ftype); |
| 657 | + break; |
| 658 | + } |
| 659 | + $xfer += $input->readFieldEnd(); |
| 660 | + } |
| 661 | + $xfer += $input->readStructEnd(); |
| 662 | + return $xfer; |
| 663 | + } |
| 664 | + |
| 665 | + public function write($output) { |
| 666 | + $xfer = 0; |
| 667 | + $xfer += $output->writeStructBegin('ColumnParent'); |
| 668 | + if ($this->column_family !== null) { |
| 669 | + $xfer += $output->writeFieldBegin('column_family', TType::STRING, 3); |
| 670 | + $xfer += $output->writeString($this->column_family); |
| 671 | + $xfer += $output->writeFieldEnd(); |
| 672 | + } |
| 673 | + if ($this->super_column !== null) { |
| 674 | + $xfer += $output->writeFieldBegin('super_column', TType::STRING, 4); |
| 675 | + $xfer += $output->writeString($this->super_column); |
| 676 | + $xfer += $output->writeFieldEnd(); |
| 677 | + } |
| 678 | + $xfer += $output->writeFieldStop(); |
| 679 | + $xfer += $output->writeStructEnd(); |
| 680 | + return $xfer; |
| 681 | + } |
| 682 | + |
| 683 | +} |
| 684 | + |
| 685 | +class cassandra_ColumnPath { |
| 686 | + static $_TSPEC; |
| 687 | + |
| 688 | + public $column_family = null; |
| 689 | + public $super_column = null; |
| 690 | + public $column = null; |
| 691 | + |
| 692 | + public function __construct($vals=null) { |
| 693 | + if (!isset(self::$_TSPEC)) { |
| 694 | + self::$_TSPEC = array( |
| 695 | + 3 => array( |
| 696 | + 'var' => 'column_family', |
| 697 | + 'type' => TType::STRING, |
| 698 | + ), |
| 699 | + 4 => array( |
| 700 | + 'var' => 'super_column', |
| 701 | + 'type' => TType::STRING, |
| 702 | + ), |
| 703 | + 5 => array( |
| 704 | + 'var' => 'column', |
| 705 | + 'type' => TType::STRING, |
| 706 | + ), |
| 707 | + ); |
| 708 | + } |
| 709 | + if (is_array($vals)) { |
| 710 | + if (isset($vals['column_family'])) { |
| 711 | + $this->column_family = $vals['column_family']; |
| 712 | + } |
| 713 | + if (isset($vals['super_column'])) { |
| 714 | + $this->super_column = $vals['super_column']; |
| 715 | + } |
| 716 | + if (isset($vals['column'])) { |
| 717 | + $this->column = $vals['column']; |
| 718 | + } |
| 719 | + } |
| 720 | + } |
| 721 | + |
| 722 | + public function getName() { |
| 723 | + return 'ColumnPath'; |
| 724 | + } |
| 725 | + |
| 726 | + public function read($input) |
| 727 | + { |
| 728 | + $xfer = 0; |
| 729 | + $fname = null; |
| 730 | + $ftype = 0; |
| 731 | + $fid = 0; |
| 732 | + $xfer += $input->readStructBegin($fname); |
| 733 | + while (true) |
| 734 | + { |
| 735 | + $xfer += $input->readFieldBegin($fname, $ftype, $fid); |
| 736 | + if ($ftype == TType::STOP) { |
| 737 | + break; |
| 738 | + } |
| 739 | + switch ($fid) |
| 740 | + { |
| 741 | + case 3: |
| 742 | + if ($ftype == TType::STRING) { |
| 743 | + $xfer += $input->readString($this->column_family); |
| 744 | + } else { |
| 745 | + $xfer += $input->skip($ftype); |
| 746 | + } |
| 747 | + break; |
| 748 | + case 4: |
| 749 | + if ($ftype == TType::STRING) { |
| 750 | + $xfer += $input->readString($this->super_column); |
| 751 | + } else { |
| 752 | + $xfer += $input->skip($ftype); |
| 753 | + } |
| 754 | + break; |
| 755 | + case 5: |
| 756 | + if ($ftype == TType::STRING) { |
| 757 | + $xfer += $input->readString($this->column); |
| 758 | + } else { |
| 759 | + $xfer += $input->skip($ftype); |
| 760 | + } |
| 761 | + break; |
| 762 | + default: |
| 763 | + $xfer += $input->skip($ftype); |
| 764 | + break; |
| 765 | + } |
| 766 | + $xfer += $input->readFieldEnd(); |
| 767 | + } |
| 768 | + $xfer += $input->readStructEnd(); |
| 769 | + return $xfer; |
| 770 | + } |
| 771 | + |
| 772 | + public function write($output) { |
| 773 | + $xfer = 0; |
| 774 | + $xfer += $output->writeStructBegin('ColumnPath'); |
| 775 | + if ($this->column_family !== null) { |
| 776 | + $xfer += $output->writeFieldBegin('column_family', TType::STRING, 3); |
| 777 | + $xfer += $output->writeString($this->column_family); |
| 778 | + $xfer += $output->writeFieldEnd(); |
| 779 | + } |
| 780 | + if ($this->super_column !== null) { |
| 781 | + $xfer += $output->writeFieldBegin('super_column', TType::STRING, 4); |
| 782 | + $xfer += $output->writeString($this->super_column); |
| 783 | + $xfer += $output->writeFieldEnd(); |
| 784 | + } |
| 785 | + if ($this->column !== null) { |
| 786 | + $xfer += $output->writeFieldBegin('column', TType::STRING, 5); |
| 787 | + $xfer += $output->writeString($this->column); |
| 788 | + $xfer += $output->writeFieldEnd(); |
| 789 | + } |
| 790 | + $xfer += $output->writeFieldStop(); |
| 791 | + $xfer += $output->writeStructEnd(); |
| 792 | + return $xfer; |
| 793 | + } |
| 794 | + |
| 795 | +} |
| 796 | + |
| 797 | +class cassandra_SliceRange { |
| 798 | + static $_TSPEC; |
| 799 | + |
| 800 | + public $start = null; |
| 801 | + public $finish = null; |
| 802 | + public $reversed = false; |
| 803 | + public $count = 100; |
| 804 | + |
| 805 | + public function __construct($vals=null) { |
| 806 | + if (!isset(self::$_TSPEC)) { |
| 807 | + self::$_TSPEC = array( |
| 808 | + 1 => array( |
| 809 | + 'var' => 'start', |
| 810 | + 'type' => TType::STRING, |
| 811 | + ), |
| 812 | + 2 => array( |
| 813 | + 'var' => 'finish', |
| 814 | + 'type' => TType::STRING, |
| 815 | + ), |
| 816 | + 3 => array( |
| 817 | + 'var' => 'reversed', |
| 818 | + 'type' => TType::BOOL, |
| 819 | + ), |
| 820 | + 4 => array( |
| 821 | + 'var' => 'count', |
| 822 | + 'type' => TType::I32, |
| 823 | + ), |
| 824 | + ); |
| 825 | + } |
| 826 | + if (is_array($vals)) { |
| 827 | + if (isset($vals['start'])) { |
| 828 | + $this->start = $vals['start']; |
| 829 | + } |
| 830 | + if (isset($vals['finish'])) { |
| 831 | + $this->finish = $vals['finish']; |
| 832 | + } |
| 833 | + if (isset($vals['reversed'])) { |
| 834 | + $this->reversed = $vals['reversed']; |
| 835 | + } |
| 836 | + if (isset($vals['count'])) { |
| 837 | + $this->count = $vals['count']; |
| 838 | + } |
| 839 | + } |
| 840 | + } |
| 841 | + |
| 842 | + public function getName() { |
| 843 | + return 'SliceRange'; |
| 844 | + } |
| 845 | + |
| 846 | + public function read($input) |
| 847 | + { |
| 848 | + $xfer = 0; |
| 849 | + $fname = null; |
| 850 | + $ftype = 0; |
| 851 | + $fid = 0; |
| 852 | + $xfer += $input->readStructBegin($fname); |
| 853 | + while (true) |
| 854 | + { |
| 855 | + $xfer += $input->readFieldBegin($fname, $ftype, $fid); |
| 856 | + if ($ftype == TType::STOP) { |
| 857 | + break; |
| 858 | + } |
| 859 | + switch ($fid) |
| 860 | + { |
| 861 | + case 1: |
| 862 | + if ($ftype == TType::STRING) { |
| 863 | + $xfer += $input->readString($this->start); |
| 864 | + } else { |
| 865 | + $xfer += $input->skip($ftype); |
| 866 | + } |
| 867 | + break; |
| 868 | + case 2: |
| 869 | + if ($ftype == TType::STRING) { |
| 870 | + $xfer += $input->readString($this->finish); |
| 871 | + } else { |
| 872 | + $xfer += $input->skip($ftype); |
| 873 | + } |
| 874 | + break; |
| 875 | + case 3: |
| 876 | + if ($ftype == TType::BOOL) { |
| 877 | + $xfer += $input->readBool($this->reversed); |
| 878 | + } else { |
| 879 | + $xfer += $input->skip($ftype); |
| 880 | + } |
| 881 | + break; |
| 882 | + case 4: |
| 883 | + if ($ftype == TType::I32) { |
| 884 | + $xfer += $input->readI32($this->count); |
| 885 | + } else { |
| 886 | + $xfer += $input->skip($ftype); |
| 887 | + } |
| 888 | + break; |
| 889 | + default: |
| 890 | + $xfer += $input->skip($ftype); |
| 891 | + break; |
| 892 | + } |
| 893 | + $xfer += $input->readFieldEnd(); |
| 894 | + } |
| 895 | + $xfer += $input->readStructEnd(); |
| 896 | + return $xfer; |
| 897 | + } |
| 898 | + |
| 899 | + public function write($output) { |
| 900 | + $xfer = 0; |
| 901 | + $xfer += $output->writeStructBegin('SliceRange'); |
| 902 | + if ($this->start !== null) { |
| 903 | + $xfer += $output->writeFieldBegin('start', TType::STRING, 1); |
| 904 | + $xfer += $output->writeString($this->start); |
| 905 | + $xfer += $output->writeFieldEnd(); |
| 906 | + } |
| 907 | + if ($this->finish !== null) { |
| 908 | + $xfer += $output->writeFieldBegin('finish', TType::STRING, 2); |
| 909 | + $xfer += $output->writeString($this->finish); |
| 910 | + $xfer += $output->writeFieldEnd(); |
| 911 | + } |
| 912 | + if ($this->reversed !== null) { |
| 913 | + $xfer += $output->writeFieldBegin('reversed', TType::BOOL, 3); |
| 914 | + $xfer += $output->writeBool($this->reversed); |
| 915 | + $xfer += $output->writeFieldEnd(); |
| 916 | + } |
| 917 | + if ($this->count !== null) { |
| 918 | + $xfer += $output->writeFieldBegin('count', TType::I32, 4); |
| 919 | + $xfer += $output->writeI32($this->count); |
| 920 | + $xfer += $output->writeFieldEnd(); |
| 921 | + } |
| 922 | + $xfer += $output->writeFieldStop(); |
| 923 | + $xfer += $output->writeStructEnd(); |
| 924 | + return $xfer; |
| 925 | + } |
| 926 | + |
| 927 | +} |
| 928 | + |
| 929 | +class cassandra_SlicePredicate { |
| 930 | + static $_TSPEC; |
| 931 | + |
| 932 | + public $column_names = null; |
| 933 | + public $slice_range = null; |
| 934 | + |
| 935 | + public function __construct($vals=null) { |
| 936 | + if (!isset(self::$_TSPEC)) { |
| 937 | + self::$_TSPEC = array( |
| 938 | + 1 => array( |
| 939 | + 'var' => 'column_names', |
| 940 | + 'type' => TType::LST, |
| 941 | + 'etype' => TType::STRING, |
| 942 | + 'elem' => array( |
| 943 | + 'type' => TType::STRING, |
| 944 | + ), |
| 945 | + ), |
| 946 | + 2 => array( |
| 947 | + 'var' => 'slice_range', |
| 948 | + 'type' => TType::STRUCT, |
| 949 | + 'class' => 'cassandra_SliceRange', |
| 950 | + ), |
| 951 | + ); |
| 952 | + } |
| 953 | + if (is_array($vals)) { |
| 954 | + if (isset($vals['column_names'])) { |
| 955 | + $this->column_names = $vals['column_names']; |
| 956 | + } |
| 957 | + if (isset($vals['slice_range'])) { |
| 958 | + $this->slice_range = $vals['slice_range']; |
| 959 | + } |
| 960 | + } |
| 961 | + } |
| 962 | + |
| 963 | + public function getName() { |
| 964 | + return 'SlicePredicate'; |
| 965 | + } |
| 966 | + |
| 967 | + public function read($input) |
| 968 | + { |
| 969 | + $xfer = 0; |
| 970 | + $fname = null; |
| 971 | + $ftype = 0; |
| 972 | + $fid = 0; |
| 973 | + $xfer += $input->readStructBegin($fname); |
| 974 | + while (true) |
| 975 | + { |
| 976 | + $xfer += $input->readFieldBegin($fname, $ftype, $fid); |
| 977 | + if ($ftype == TType::STOP) { |
| 978 | + break; |
| 979 | + } |
| 980 | + switch ($fid) |
| 981 | + { |
| 982 | + case 1: |
| 983 | + if ($ftype == TType::LST) { |
| 984 | + $this->column_names = array(); |
| 985 | + $_size7 = 0; |
| 986 | + $_etype10 = 0; |
| 987 | + $xfer += $input->readListBegin($_etype10, $_size7); |
| 988 | + for ($_i11 = 0; $_i11 < $_size7; ++$_i11) |
| 989 | + { |
| 990 | + $elem12 = null; |
| 991 | + $xfer += $input->readString($elem12); |
| 992 | + $this->column_names []= $elem12; |
| 993 | + } |
| 994 | + $xfer += $input->readListEnd(); |
| 995 | + } else { |
| 996 | + $xfer += $input->skip($ftype); |
| 997 | + } |
| 998 | + break; |
| 999 | + case 2: |
| 1000 | + if ($ftype == TType::STRUCT) { |
| 1001 | + $this->slice_range = new cassandra_SliceRange(); |
| 1002 | + $xfer += $this->slice_range->read($input); |
| 1003 | + } else { |
| 1004 | + $xfer += $input->skip($ftype); |
| 1005 | + } |
| 1006 | + break; |
| 1007 | + default: |
| 1008 | + $xfer += $input->skip($ftype); |
| 1009 | + break; |
| 1010 | + } |
| 1011 | + $xfer += $input->readFieldEnd(); |
| 1012 | + } |
| 1013 | + $xfer += $input->readStructEnd(); |
| 1014 | + return $xfer; |
| 1015 | + } |
| 1016 | + |
| 1017 | + public function write($output) { |
| 1018 | + $xfer = 0; |
| 1019 | + $xfer += $output->writeStructBegin('SlicePredicate'); |
| 1020 | + if ($this->column_names !== null) { |
| 1021 | + if (!is_array($this->column_names)) { |
| 1022 | + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); |
| 1023 | + } |
| 1024 | + $xfer += $output->writeFieldBegin('column_names', TType::LST, 1); |
| 1025 | + { |
| 1026 | + $output->writeListBegin(TType::STRING, count($this->column_names)); |
| 1027 | + { |
| 1028 | + foreach ($this->column_names as $iter13) |
| 1029 | + { |
| 1030 | + $xfer += $output->writeString($iter13); |
| 1031 | + } |
| 1032 | + } |
| 1033 | + $output->writeListEnd(); |
| 1034 | + } |
| 1035 | + $xfer += $output->writeFieldEnd(); |
| 1036 | + } |
| 1037 | + if ($this->slice_range !== null) { |
| 1038 | + if (!is_object($this->slice_range)) { |
| 1039 | + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); |
| 1040 | + } |
| 1041 | + $xfer += $output->writeFieldBegin('slice_range', TType::STRUCT, 2); |
| 1042 | + $xfer += $this->slice_range->write($output); |
| 1043 | + $xfer += $output->writeFieldEnd(); |
| 1044 | + } |
| 1045 | + $xfer += $output->writeFieldStop(); |
| 1046 | + $xfer += $output->writeStructEnd(); |
| 1047 | + return $xfer; |
| 1048 | + } |
| 1049 | + |
| 1050 | +} |
| 1051 | + |
| 1052 | +class cassandra_KeySlice { |
| 1053 | + static $_TSPEC; |
| 1054 | + |
| 1055 | + public $key = null; |
| 1056 | + public $columns = null; |
| 1057 | + |
| 1058 | + public function __construct($vals=null) { |
| 1059 | + if (!isset(self::$_TSPEC)) { |
| 1060 | + self::$_TSPEC = array( |
| 1061 | + 1 => array( |
| 1062 | + 'var' => 'key', |
| 1063 | + 'type' => TType::STRING, |
| 1064 | + ), |
| 1065 | + 2 => array( |
| 1066 | + 'var' => 'columns', |
| 1067 | + 'type' => TType::LST, |
| 1068 | + 'etype' => TType::STRUCT, |
| 1069 | + 'elem' => array( |
| 1070 | + 'type' => TType::STRUCT, |
| 1071 | + 'class' => 'cassandra_ColumnOrSuperColumn', |
| 1072 | + ), |
| 1073 | + ), |
| 1074 | + ); |
| 1075 | + } |
| 1076 | + if (is_array($vals)) { |
| 1077 | + if (isset($vals['key'])) { |
| 1078 | + $this->key = $vals['key']; |
| 1079 | + } |
| 1080 | + if (isset($vals['columns'])) { |
| 1081 | + $this->columns = $vals['columns']; |
| 1082 | + } |
| 1083 | + } |
| 1084 | + } |
| 1085 | + |
| 1086 | + public function getName() { |
| 1087 | + return 'KeySlice'; |
| 1088 | + } |
| 1089 | + |
| 1090 | + public function read($input) |
| 1091 | + { |
| 1092 | + $xfer = 0; |
| 1093 | + $fname = null; |
| 1094 | + $ftype = 0; |
| 1095 | + $fid = 0; |
| 1096 | + $xfer += $input->readStructBegin($fname); |
| 1097 | + while (true) |
| 1098 | + { |
| 1099 | + $xfer += $input->readFieldBegin($fname, $ftype, $fid); |
| 1100 | + if ($ftype == TType::STOP) { |
| 1101 | + break; |
| 1102 | + } |
| 1103 | + switch ($fid) |
| 1104 | + { |
| 1105 | + case 1: |
| 1106 | + if ($ftype == TType::STRING) { |
| 1107 | + $xfer += $input->readString($this->key); |
| 1108 | + } else { |
| 1109 | + $xfer += $input->skip($ftype); |
| 1110 | + } |
| 1111 | + break; |
| 1112 | + case 2: |
| 1113 | + if ($ftype == TType::LST) { |
| 1114 | + $this->columns = array(); |
| 1115 | + $_size14 = 0; |
| 1116 | + $_etype17 = 0; |
| 1117 | + $xfer += $input->readListBegin($_etype17, $_size14); |
| 1118 | + for ($_i18 = 0; $_i18 < $_size14; ++$_i18) |
| 1119 | + { |
| 1120 | + $elem19 = null; |
| 1121 | + $elem19 = new cassandra_ColumnOrSuperColumn(); |
| 1122 | + $xfer += $elem19->read($input); |
| 1123 | + $this->columns []= $elem19; |
| 1124 | + } |
| 1125 | + $xfer += $input->readListEnd(); |
| 1126 | + } else { |
| 1127 | + $xfer += $input->skip($ftype); |
| 1128 | + } |
| 1129 | + break; |
| 1130 | + default: |
| 1131 | + $xfer += $input->skip($ftype); |
| 1132 | + break; |
| 1133 | + } |
| 1134 | + $xfer += $input->readFieldEnd(); |
| 1135 | + } |
| 1136 | + $xfer += $input->readStructEnd(); |
| 1137 | + return $xfer; |
| 1138 | + } |
| 1139 | + |
| 1140 | + public function write($output) { |
| 1141 | + $xfer = 0; |
| 1142 | + $xfer += $output->writeStructBegin('KeySlice'); |
| 1143 | + if ($this->key !== null) { |
| 1144 | + $xfer += $output->writeFieldBegin('key', TType::STRING, 1); |
| 1145 | + $xfer += $output->writeString($this->key); |
| 1146 | + $xfer += $output->writeFieldEnd(); |
| 1147 | + } |
| 1148 | + if ($this->columns !== null) { |
| 1149 | + if (!is_array($this->columns)) { |
| 1150 | + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); |
| 1151 | + } |
| 1152 | + $xfer += $output->writeFieldBegin('columns', TType::LST, 2); |
| 1153 | + { |
| 1154 | + $output->writeListBegin(TType::STRUCT, count($this->columns)); |
| 1155 | + { |
| 1156 | + foreach ($this->columns as $iter20) |
| 1157 | + { |
| 1158 | + $xfer += $iter20->write($output); |
| 1159 | + } |
| 1160 | + } |
| 1161 | + $output->writeListEnd(); |
| 1162 | + } |
| 1163 | + $xfer += $output->writeFieldEnd(); |
| 1164 | + } |
| 1165 | + $xfer += $output->writeFieldStop(); |
| 1166 | + $xfer += $output->writeStructEnd(); |
| 1167 | + return $xfer; |
| 1168 | + } |
| 1169 | + |
| 1170 | +} |
| 1171 | + |
| 1172 | +?> |
\ No newline at end of file |
Property changes on: trunk/extensions/Cassandra/lib/cassandra_types.php |
___________________________________________________________________ |
Name: svn:eol-style |
1 | 1173 | + native |
Index: trunk/extensions/Cassandra/lib/README |
— | — | @@ -0,0 +1,3 @@ |
| 2 | +This directory contains the autogenerated Cassandra access library,
|
| 3 | +for convenience of Windows folks who can't build it themselves without
|
| 4 | +unreasonable PITA. |
\ No newline at end of file |
Index: trunk/extensions/Cassandra/.htaccess |
— | — | @@ -0,0 +1 @@ |
| 2 | +Deny from all |
\ No newline at end of file |