blob: 276dea35d12211ffe6279521928f37b75f9f918c [file] [log] [blame]
/**
* Autogenerated by Thrift Compiler (0.9.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.blur.thrift.generated;
/**
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import org.apache.blur.thirdparty.thrift_0_9_0.scheme.IScheme;
import org.apache.blur.thirdparty.thrift_0_9_0.scheme.SchemeFactory;
import org.apache.blur.thirdparty.thrift_0_9_0.scheme.StandardScheme;
import org.apache.blur.thirdparty.thrift_0_9_0.scheme.TupleScheme;
import org.apache.blur.thirdparty.thrift_0_9_0.protocol.TTupleProtocol;
import org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocolException;
import org.apache.blur.thirdparty.thrift_0_9_0.EncodingUtils;
import org.apache.blur.thirdparty.thrift_0_9_0.TException;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.util.HashMap;
import java.util.EnumMap;
import java.util.Set;
import java.util.HashSet;
import java.util.EnumSet;
import java.util.Collections;
import java.util.BitSet;
import java.nio.ByteBuffer;
import java.util.Arrays;
//import org.slf4j.Logger;
//import org.slf4j.LoggerFactory;
public class CommandStatus implements org.apache.blur.thirdparty.thrift_0_9_0.TBase<CommandStatus, CommandStatus._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.blur.thirdparty.thrift_0_9_0.protocol.TStruct STRUCT_DESC = new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TStruct("CommandStatus");
private static final org.apache.blur.thirdparty.thrift_0_9_0.protocol.TField EXECUTION_ID_FIELD_DESC = new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TField("executionId", org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRING, (short)1);
private static final org.apache.blur.thirdparty.thrift_0_9_0.protocol.TField COMMAND_NAME_FIELD_DESC = new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TField("commandName", org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRING, (short)2);
private static final org.apache.blur.thirdparty.thrift_0_9_0.protocol.TField ARGUMENTS_FIELD_DESC = new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TField("arguments", org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRUCT, (short)3);
private static final org.apache.blur.thirdparty.thrift_0_9_0.protocol.TField SERVER_STATE_MAP_FIELD_DESC = new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TField("serverStateMap", org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.MAP, (short)4);
private static final org.apache.blur.thirdparty.thrift_0_9_0.protocol.TField USER_FIELD_DESC = new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TField("user", org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRUCT, (short)5);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new CommandStatusStandardSchemeFactory());
schemes.put(TupleScheme.class, new CommandStatusTupleSchemeFactory());
}
public String executionId; // required
public String commandName; // required
public Arguments arguments; // required
public Map<String,Map<CommandStatusState,Long>> serverStateMap; // required
public User user; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.blur.thirdparty.thrift_0_9_0.TFieldIdEnum {
EXECUTION_ID((short)1, "executionId"),
COMMAND_NAME((short)2, "commandName"),
ARGUMENTS((short)3, "arguments"),
SERVER_STATE_MAP((short)4, "serverStateMap"),
USER((short)5, "user");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // EXECUTION_ID
return EXECUTION_ID;
case 2: // COMMAND_NAME
return COMMAND_NAME;
case 3: // ARGUMENTS
return ARGUMENTS;
case 4: // SERVER_STATE_MAP
return SERVER_STATE_MAP;
case 5: // USER
return USER;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, org.apache.blur.thirdparty.thrift_0_9_0.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.blur.thirdparty.thrift_0_9_0.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.blur.thirdparty.thrift_0_9_0.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.EXECUTION_ID, new org.apache.blur.thirdparty.thrift_0_9_0.meta_data.FieldMetaData("executionId", org.apache.blur.thirdparty.thrift_0_9_0.TFieldRequirementType.DEFAULT,
new org.apache.blur.thirdparty.thrift_0_9_0.meta_data.FieldValueMetaData(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRING)));
tmpMap.put(_Fields.COMMAND_NAME, new org.apache.blur.thirdparty.thrift_0_9_0.meta_data.FieldMetaData("commandName", org.apache.blur.thirdparty.thrift_0_9_0.TFieldRequirementType.DEFAULT,
new org.apache.blur.thirdparty.thrift_0_9_0.meta_data.FieldValueMetaData(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRING)));
tmpMap.put(_Fields.ARGUMENTS, new org.apache.blur.thirdparty.thrift_0_9_0.meta_data.FieldMetaData("arguments", org.apache.blur.thirdparty.thrift_0_9_0.TFieldRequirementType.DEFAULT,
new org.apache.blur.thirdparty.thrift_0_9_0.meta_data.StructMetaData(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRUCT, Arguments.class)));
tmpMap.put(_Fields.SERVER_STATE_MAP, new org.apache.blur.thirdparty.thrift_0_9_0.meta_data.FieldMetaData("serverStateMap", org.apache.blur.thirdparty.thrift_0_9_0.TFieldRequirementType.DEFAULT,
new org.apache.blur.thirdparty.thrift_0_9_0.meta_data.MapMetaData(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.MAP,
new org.apache.blur.thirdparty.thrift_0_9_0.meta_data.FieldValueMetaData(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRING),
new org.apache.blur.thirdparty.thrift_0_9_0.meta_data.MapMetaData(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.MAP,
new org.apache.blur.thirdparty.thrift_0_9_0.meta_data.EnumMetaData(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.ENUM, CommandStatusState.class),
new org.apache.blur.thirdparty.thrift_0_9_0.meta_data.FieldValueMetaData(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.I64)))));
tmpMap.put(_Fields.USER, new org.apache.blur.thirdparty.thrift_0_9_0.meta_data.FieldMetaData("user", org.apache.blur.thirdparty.thrift_0_9_0.TFieldRequirementType.DEFAULT,
new org.apache.blur.thirdparty.thrift_0_9_0.meta_data.StructMetaData(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRUCT, User.class)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.blur.thirdparty.thrift_0_9_0.meta_data.FieldMetaData.addStructMetaDataMap(CommandStatus.class, metaDataMap);
}
public CommandStatus() {
}
public CommandStatus(
String executionId,
String commandName,
Arguments arguments,
Map<String,Map<CommandStatusState,Long>> serverStateMap,
User user)
{
this();
this.executionId = executionId;
this.commandName = commandName;
this.arguments = arguments;
this.serverStateMap = serverStateMap;
this.user = user;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public CommandStatus(CommandStatus other) {
if (other.isSetExecutionId()) {
this.executionId = other.executionId;
}
if (other.isSetCommandName()) {
this.commandName = other.commandName;
}
if (other.isSetArguments()) {
this.arguments = new Arguments(other.arguments);
}
if (other.isSetServerStateMap()) {
Map<String,Map<CommandStatusState,Long>> __this__serverStateMap = new HashMap<String,Map<CommandStatusState,Long>>();
for (Map.Entry<String, Map<CommandStatusState,Long>> other_element : other.serverStateMap.entrySet()) {
String other_element_key = other_element.getKey();
Map<CommandStatusState,Long> other_element_value = other_element.getValue();
String __this__serverStateMap_copy_key = other_element_key;
Map<CommandStatusState,Long> __this__serverStateMap_copy_value = new HashMap<CommandStatusState,Long>();
for (Map.Entry<CommandStatusState, Long> other_element_value_element : other_element_value.entrySet()) {
CommandStatusState other_element_value_element_key = other_element_value_element.getKey();
Long other_element_value_element_value = other_element_value_element.getValue();
CommandStatusState __this__serverStateMap_copy_value_copy_key = other_element_value_element_key;
Long __this__serverStateMap_copy_value_copy_value = other_element_value_element_value;
__this__serverStateMap_copy_value.put(__this__serverStateMap_copy_value_copy_key, __this__serverStateMap_copy_value_copy_value);
}
__this__serverStateMap.put(__this__serverStateMap_copy_key, __this__serverStateMap_copy_value);
}
this.serverStateMap = __this__serverStateMap;
}
if (other.isSetUser()) {
this.user = new User(other.user);
}
}
public CommandStatus deepCopy() {
return new CommandStatus(this);
}
@Override
public void clear() {
this.executionId = null;
this.commandName = null;
this.arguments = null;
this.serverStateMap = null;
this.user = null;
}
public String getExecutionId() {
return this.executionId;
}
public CommandStatus setExecutionId(String executionId) {
this.executionId = executionId;
return this;
}
public void unsetExecutionId() {
this.executionId = null;
}
/** Returns true if field executionId is set (has been assigned a value) and false otherwise */
public boolean isSetExecutionId() {
return this.executionId != null;
}
public void setExecutionIdIsSet(boolean value) {
if (!value) {
this.executionId = null;
}
}
public String getCommandName() {
return this.commandName;
}
public CommandStatus setCommandName(String commandName) {
this.commandName = commandName;
return this;
}
public void unsetCommandName() {
this.commandName = null;
}
/** Returns true if field commandName is set (has been assigned a value) and false otherwise */
public boolean isSetCommandName() {
return this.commandName != null;
}
public void setCommandNameIsSet(boolean value) {
if (!value) {
this.commandName = null;
}
}
public Arguments getArguments() {
return this.arguments;
}
public CommandStatus setArguments(Arguments arguments) {
this.arguments = arguments;
return this;
}
public void unsetArguments() {
this.arguments = null;
}
/** Returns true if field arguments is set (has been assigned a value) and false otherwise */
public boolean isSetArguments() {
return this.arguments != null;
}
public void setArgumentsIsSet(boolean value) {
if (!value) {
this.arguments = null;
}
}
public int getServerStateMapSize() {
return (this.serverStateMap == null) ? 0 : this.serverStateMap.size();
}
public void putToServerStateMap(String key, Map<CommandStatusState,Long> val) {
if (this.serverStateMap == null) {
this.serverStateMap = new HashMap<String,Map<CommandStatusState,Long>>();
}
this.serverStateMap.put(key, val);
}
public Map<String,Map<CommandStatusState,Long>> getServerStateMap() {
return this.serverStateMap;
}
public CommandStatus setServerStateMap(Map<String,Map<CommandStatusState,Long>> serverStateMap) {
this.serverStateMap = serverStateMap;
return this;
}
public void unsetServerStateMap() {
this.serverStateMap = null;
}
/** Returns true if field serverStateMap is set (has been assigned a value) and false otherwise */
public boolean isSetServerStateMap() {
return this.serverStateMap != null;
}
public void setServerStateMapIsSet(boolean value) {
if (!value) {
this.serverStateMap = null;
}
}
public User getUser() {
return this.user;
}
public CommandStatus setUser(User user) {
this.user = user;
return this;
}
public void unsetUser() {
this.user = null;
}
/** Returns true if field user is set (has been assigned a value) and false otherwise */
public boolean isSetUser() {
return this.user != null;
}
public void setUserIsSet(boolean value) {
if (!value) {
this.user = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case EXECUTION_ID:
if (value == null) {
unsetExecutionId();
} else {
setExecutionId((String)value);
}
break;
case COMMAND_NAME:
if (value == null) {
unsetCommandName();
} else {
setCommandName((String)value);
}
break;
case ARGUMENTS:
if (value == null) {
unsetArguments();
} else {
setArguments((Arguments)value);
}
break;
case SERVER_STATE_MAP:
if (value == null) {
unsetServerStateMap();
} else {
setServerStateMap((Map<String,Map<CommandStatusState,Long>>)value);
}
break;
case USER:
if (value == null) {
unsetUser();
} else {
setUser((User)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case EXECUTION_ID:
return getExecutionId();
case COMMAND_NAME:
return getCommandName();
case ARGUMENTS:
return getArguments();
case SERVER_STATE_MAP:
return getServerStateMap();
case USER:
return getUser();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case EXECUTION_ID:
return isSetExecutionId();
case COMMAND_NAME:
return isSetCommandName();
case ARGUMENTS:
return isSetArguments();
case SERVER_STATE_MAP:
return isSetServerStateMap();
case USER:
return isSetUser();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof CommandStatus)
return this.equals((CommandStatus)that);
return false;
}
public boolean equals(CommandStatus that) {
if (that == null)
return false;
boolean this_present_executionId = true && this.isSetExecutionId();
boolean that_present_executionId = true && that.isSetExecutionId();
if (this_present_executionId || that_present_executionId) {
if (!(this_present_executionId && that_present_executionId))
return false;
if (!this.executionId.equals(that.executionId))
return false;
}
boolean this_present_commandName = true && this.isSetCommandName();
boolean that_present_commandName = true && that.isSetCommandName();
if (this_present_commandName || that_present_commandName) {
if (!(this_present_commandName && that_present_commandName))
return false;
if (!this.commandName.equals(that.commandName))
return false;
}
boolean this_present_arguments = true && this.isSetArguments();
boolean that_present_arguments = true && that.isSetArguments();
if (this_present_arguments || that_present_arguments) {
if (!(this_present_arguments && that_present_arguments))
return false;
if (!this.arguments.equals(that.arguments))
return false;
}
boolean this_present_serverStateMap = true && this.isSetServerStateMap();
boolean that_present_serverStateMap = true && that.isSetServerStateMap();
if (this_present_serverStateMap || that_present_serverStateMap) {
if (!(this_present_serverStateMap && that_present_serverStateMap))
return false;
if (!this.serverStateMap.equals(that.serverStateMap))
return false;
}
boolean this_present_user = true && this.isSetUser();
boolean that_present_user = true && that.isSetUser();
if (this_present_user || that_present_user) {
if (!(this_present_user && that_present_user))
return false;
if (!this.user.equals(that.user))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(CommandStatus other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
CommandStatus typedOther = (CommandStatus)other;
lastComparison = Boolean.valueOf(isSetExecutionId()).compareTo(typedOther.isSetExecutionId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetExecutionId()) {
lastComparison = org.apache.blur.thirdparty.thrift_0_9_0.TBaseHelper.compareTo(this.executionId, typedOther.executionId);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetCommandName()).compareTo(typedOther.isSetCommandName());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetCommandName()) {
lastComparison = org.apache.blur.thirdparty.thrift_0_9_0.TBaseHelper.compareTo(this.commandName, typedOther.commandName);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetArguments()).compareTo(typedOther.isSetArguments());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetArguments()) {
lastComparison = org.apache.blur.thirdparty.thrift_0_9_0.TBaseHelper.compareTo(this.arguments, typedOther.arguments);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetServerStateMap()).compareTo(typedOther.isSetServerStateMap());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetServerStateMap()) {
lastComparison = org.apache.blur.thirdparty.thrift_0_9_0.TBaseHelper.compareTo(this.serverStateMap, typedOther.serverStateMap);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetUser()).compareTo(typedOther.isSetUser());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetUser()) {
lastComparison = org.apache.blur.thirdparty.thrift_0_9_0.TBaseHelper.compareTo(this.user, typedOther.user);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocol iprot) throws org.apache.blur.thirdparty.thrift_0_9_0.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocol oprot) throws org.apache.blur.thirdparty.thrift_0_9_0.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("CommandStatus(");
boolean first = true;
sb.append("executionId:");
if (this.executionId == null) {
sb.append("null");
} else {
sb.append(this.executionId);
}
first = false;
if (!first) sb.append(", ");
sb.append("commandName:");
if (this.commandName == null) {
sb.append("null");
} else {
sb.append(this.commandName);
}
first = false;
if (!first) sb.append(", ");
sb.append("arguments:");
if (this.arguments == null) {
sb.append("null");
} else {
sb.append(this.arguments);
}
first = false;
if (!first) sb.append(", ");
sb.append("serverStateMap:");
if (this.serverStateMap == null) {
sb.append("null");
} else {
sb.append(this.serverStateMap);
}
first = false;
if (!first) sb.append(", ");
sb.append("user:");
if (this.user == null) {
sb.append("null");
} else {
sb.append(this.user);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.blur.thirdparty.thrift_0_9_0.TException {
// check for required fields
// check for sub-struct validity
if (arguments != null) {
arguments.validate();
}
if (user != null) {
user.validate();
}
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TCompactProtocol(new org.apache.blur.thirdparty.thrift_0_9_0.transport.TIOStreamTransport(out)));
} catch (org.apache.blur.thirdparty.thrift_0_9_0.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TCompactProtocol(new org.apache.blur.thirdparty.thrift_0_9_0.transport.TIOStreamTransport(in)));
} catch (org.apache.blur.thirdparty.thrift_0_9_0.TException te) {
throw new java.io.IOException(te);
}
}
private static class CommandStatusStandardSchemeFactory implements SchemeFactory {
public CommandStatusStandardScheme getScheme() {
return new CommandStatusStandardScheme();
}
}
private static class CommandStatusStandardScheme extends StandardScheme<CommandStatus> {
public void read(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocol iprot, CommandStatus struct) throws org.apache.blur.thirdparty.thrift_0_9_0.TException {
org.apache.blur.thirdparty.thrift_0_9_0.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 1: // EXECUTION_ID
if (schemeField.type == org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRING) {
struct.executionId = iprot.readString();
struct.setExecutionIdIsSet(true);
} else {
org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // COMMAND_NAME
if (schemeField.type == org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRING) {
struct.commandName = iprot.readString();
struct.setCommandNameIsSet(true);
} else {
org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // ARGUMENTS
if (schemeField.type == org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRUCT) {
struct.arguments = new Arguments();
struct.arguments.read(iprot);
struct.setArgumentsIsSet(true);
} else {
org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 4: // SERVER_STATE_MAP
if (schemeField.type == org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.MAP) {
{
org.apache.blur.thirdparty.thrift_0_9_0.protocol.TMap _map270 = iprot.readMapBegin();
struct.serverStateMap = new HashMap<String,Map<CommandStatusState,Long>>(2*_map270.size);
for (int _i271 = 0; _i271 < _map270.size; ++_i271)
{
String _key272; // required
Map<CommandStatusState,Long> _val273; // required
_key272 = iprot.readString();
{
org.apache.blur.thirdparty.thrift_0_9_0.protocol.TMap _map274 = iprot.readMapBegin();
_val273 = new HashMap<CommandStatusState,Long>(2*_map274.size);
for (int _i275 = 0; _i275 < _map274.size; ++_i275)
{
CommandStatusState _key276; // required
long _val277; // required
_key276 = CommandStatusState.findByValue(iprot.readI32());
_val277 = iprot.readI64();
_val273.put(_key276, _val277);
}
iprot.readMapEnd();
}
struct.serverStateMap.put(_key272, _val273);
}
iprot.readMapEnd();
}
struct.setServerStateMapIsSet(true);
} else {
org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 5: // USER
if (schemeField.type == org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRUCT) {
struct.user = new User();
struct.user.read(iprot);
struct.setUserIsSet(true);
} else {
org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocol oprot, CommandStatus struct) throws org.apache.blur.thirdparty.thrift_0_9_0.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.executionId != null) {
oprot.writeFieldBegin(EXECUTION_ID_FIELD_DESC);
oprot.writeString(struct.executionId);
oprot.writeFieldEnd();
}
if (struct.commandName != null) {
oprot.writeFieldBegin(COMMAND_NAME_FIELD_DESC);
oprot.writeString(struct.commandName);
oprot.writeFieldEnd();
}
if (struct.arguments != null) {
oprot.writeFieldBegin(ARGUMENTS_FIELD_DESC);
struct.arguments.write(oprot);
oprot.writeFieldEnd();
}
if (struct.serverStateMap != null) {
oprot.writeFieldBegin(SERVER_STATE_MAP_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TMap(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRING, org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.MAP, struct.serverStateMap.size()));
for (Map.Entry<String, Map<CommandStatusState,Long>> _iter278 : struct.serverStateMap.entrySet())
{
oprot.writeString(_iter278.getKey());
{
oprot.writeMapBegin(new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TMap(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.I32, org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.I64, _iter278.getValue().size()));
for (Map.Entry<CommandStatusState, Long> _iter279 : _iter278.getValue().entrySet())
{
oprot.writeI32(_iter279.getKey().getValue());
oprot.writeI64(_iter279.getValue());
}
oprot.writeMapEnd();
}
}
oprot.writeMapEnd();
}
oprot.writeFieldEnd();
}
if (struct.user != null) {
oprot.writeFieldBegin(USER_FIELD_DESC);
struct.user.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class CommandStatusTupleSchemeFactory implements SchemeFactory {
public CommandStatusTupleScheme getScheme() {
return new CommandStatusTupleScheme();
}
}
private static class CommandStatusTupleScheme extends TupleScheme<CommandStatus> {
@Override
public void write(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocol prot, CommandStatus struct) throws org.apache.blur.thirdparty.thrift_0_9_0.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetExecutionId()) {
optionals.set(0);
}
if (struct.isSetCommandName()) {
optionals.set(1);
}
if (struct.isSetArguments()) {
optionals.set(2);
}
if (struct.isSetServerStateMap()) {
optionals.set(3);
}
if (struct.isSetUser()) {
optionals.set(4);
}
oprot.writeBitSet(optionals, 5);
if (struct.isSetExecutionId()) {
oprot.writeString(struct.executionId);
}
if (struct.isSetCommandName()) {
oprot.writeString(struct.commandName);
}
if (struct.isSetArguments()) {
struct.arguments.write(oprot);
}
if (struct.isSetServerStateMap()) {
{
oprot.writeI32(struct.serverStateMap.size());
for (Map.Entry<String, Map<CommandStatusState,Long>> _iter280 : struct.serverStateMap.entrySet())
{
oprot.writeString(_iter280.getKey());
{
oprot.writeI32(_iter280.getValue().size());
for (Map.Entry<CommandStatusState, Long> _iter281 : _iter280.getValue().entrySet())
{
oprot.writeI32(_iter281.getKey().getValue());
oprot.writeI64(_iter281.getValue());
}
}
}
}
}
if (struct.isSetUser()) {
struct.user.write(oprot);
}
}
@Override
public void read(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocol prot, CommandStatus struct) throws org.apache.blur.thirdparty.thrift_0_9_0.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(5);
if (incoming.get(0)) {
struct.executionId = iprot.readString();
struct.setExecutionIdIsSet(true);
}
if (incoming.get(1)) {
struct.commandName = iprot.readString();
struct.setCommandNameIsSet(true);
}
if (incoming.get(2)) {
struct.arguments = new Arguments();
struct.arguments.read(iprot);
struct.setArgumentsIsSet(true);
}
if (incoming.get(3)) {
{
org.apache.blur.thirdparty.thrift_0_9_0.protocol.TMap _map282 = new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TMap(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRING, org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.MAP, iprot.readI32());
struct.serverStateMap = new HashMap<String,Map<CommandStatusState,Long>>(2*_map282.size);
for (int _i283 = 0; _i283 < _map282.size; ++_i283)
{
String _key284; // required
Map<CommandStatusState,Long> _val285; // required
_key284 = iprot.readString();
{
org.apache.blur.thirdparty.thrift_0_9_0.protocol.TMap _map286 = new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TMap(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.I32, org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.I64, iprot.readI32());
_val285 = new HashMap<CommandStatusState,Long>(2*_map286.size);
for (int _i287 = 0; _i287 < _map286.size; ++_i287)
{
CommandStatusState _key288; // required
long _val289; // required
_key288 = CommandStatusState.findByValue(iprot.readI32());
_val289 = iprot.readI64();
_val285.put(_key288, _val289);
}
}
struct.serverStateMap.put(_key284, _val285);
}
}
struct.setServerStateMapIsSet(true);
}
if (incoming.get(4)) {
struct.user = new User();
struct.user.read(iprot);
struct.setUserIsSet(true);
}
}
}
}