com.twitter.zipkin.gen.ZipkinCollector Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of flume-zipkin-metrics-sink Show documentation
Show all versions of flume-zipkin-metrics-sink Show documentation
Flume Sink that will get application submitted annotations with duration from Zipkin spans and submit them to Metrics. Metrics can be configured to send metrics to several back-ends. Today this sink supports Graphite as back-end.
/**
* Autogenerated by Thrift Compiler (0.7.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
*/
package com.twitter.zipkin.gen;
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 ZipkinCollector {
public interface Iface extends com.twitter.zipkin.gen.scribe.Iface {
/**
* Aggregates methods
*
* @param service_name
* @param annotations
*/
public void storeTopAnnotations(String service_name, List annotations) throws StoreAggregatesException, org.apache.thrift.TException;
public void storeTopKeyValueAnnotations(String service_name, List annotations) throws StoreAggregatesException, org.apache.thrift.TException;
public void storeDependencies(String service_name, List endpoints) throws StoreAggregatesException, org.apache.thrift.TException;
}
public interface AsyncIface extends com.twitter.zipkin.gen.scribe .AsyncIface {
public void storeTopAnnotations(String service_name, List annotations, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
public void storeTopKeyValueAnnotations(String service_name, List annotations, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
public void storeDependencies(String service_name, List endpoints, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
}
public static class Client extends com.twitter.zipkin.gen.scribe.Client implements Iface {
public static class Factory implements org.apache.thrift.TServiceClientFactory {
public Factory() {}
public Client getClient(org.apache.thrift.protocol.TProtocol prot) {
return new Client(prot);
}
public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
return new Client(iprot, oprot);
}
}
public Client(org.apache.thrift.protocol.TProtocol prot)
{
super(prot, prot);
}
public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
super(iprot, oprot);
}
public void storeTopAnnotations(String service_name, List annotations) throws StoreAggregatesException, org.apache.thrift.TException
{
send_storeTopAnnotations(service_name, annotations);
recv_storeTopAnnotations();
}
public void send_storeTopAnnotations(String service_name, List annotations) throws org.apache.thrift.TException
{
storeTopAnnotations_args args = new storeTopAnnotations_args();
args.setService_name(service_name);
args.setAnnotations(annotations);
sendBase("storeTopAnnotations", args);
}
public void recv_storeTopAnnotations() throws StoreAggregatesException, org.apache.thrift.TException
{
storeTopAnnotations_result result = new storeTopAnnotations_result();
receiveBase(result, "storeTopAnnotations");
if (result.e != null) {
throw result.e;
}
return;
}
public void storeTopKeyValueAnnotations(String service_name, List annotations) throws StoreAggregatesException, org.apache.thrift.TException
{
send_storeTopKeyValueAnnotations(service_name, annotations);
recv_storeTopKeyValueAnnotations();
}
public void send_storeTopKeyValueAnnotations(String service_name, List annotations) throws org.apache.thrift.TException
{
storeTopKeyValueAnnotations_args args = new storeTopKeyValueAnnotations_args();
args.setService_name(service_name);
args.setAnnotations(annotations);
sendBase("storeTopKeyValueAnnotations", args);
}
public void recv_storeTopKeyValueAnnotations() throws StoreAggregatesException, org.apache.thrift.TException
{
storeTopKeyValueAnnotations_result result = new storeTopKeyValueAnnotations_result();
receiveBase(result, "storeTopKeyValueAnnotations");
if (result.e != null) {
throw result.e;
}
return;
}
public void storeDependencies(String service_name, List endpoints) throws StoreAggregatesException, org.apache.thrift.TException
{
send_storeDependencies(service_name, endpoints);
recv_storeDependencies();
}
public void send_storeDependencies(String service_name, List endpoints) throws org.apache.thrift.TException
{
storeDependencies_args args = new storeDependencies_args();
args.setService_name(service_name);
args.setEndpoints(endpoints);
sendBase("storeDependencies", args);
}
public void recv_storeDependencies() throws StoreAggregatesException, org.apache.thrift.TException
{
storeDependencies_result result = new storeDependencies_result();
receiveBase(result, "storeDependencies");
if (result.e != null) {
throw result.e;
}
return;
}
}
public static class AsyncClient extends com.twitter.zipkin.gen.scribe.AsyncClient implements AsyncIface {
public static class Factory implements org.apache.thrift.async.TAsyncClientFactory {
private org.apache.thrift.async.TAsyncClientManager clientManager;
private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) {
this.clientManager = clientManager;
this.protocolFactory = protocolFactory;
}
public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) {
return new AsyncClient(protocolFactory, clientManager, transport);
}
}
public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) {
super(protocolFactory, clientManager, transport);
}
public void storeTopAnnotations(String service_name, List annotations, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
checkReady();
storeTopAnnotations_call method_call = new storeTopAnnotations_call(service_name, annotations, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class storeTopAnnotations_call extends org.apache.thrift.async.TAsyncMethodCall {
private String service_name;
private List annotations;
public storeTopAnnotations_call(String service_name, List annotations, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.service_name = service_name;
this.annotations = annotations;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("storeTopAnnotations", org.apache.thrift.protocol.TMessageType.CALL, 0));
storeTopAnnotations_args args = new storeTopAnnotations_args();
args.setService_name(service_name);
args.setAnnotations(annotations);
args.write(prot);
prot.writeMessageEnd();
}
public void getResult() throws StoreAggregatesException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
(new Client(prot)).recv_storeTopAnnotations();
}
}
public void storeTopKeyValueAnnotations(String service_name, List annotations, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
checkReady();
storeTopKeyValueAnnotations_call method_call = new storeTopKeyValueAnnotations_call(service_name, annotations, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class storeTopKeyValueAnnotations_call extends org.apache.thrift.async.TAsyncMethodCall {
private String service_name;
private List annotations;
public storeTopKeyValueAnnotations_call(String service_name, List annotations, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.service_name = service_name;
this.annotations = annotations;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("storeTopKeyValueAnnotations", org.apache.thrift.protocol.TMessageType.CALL, 0));
storeTopKeyValueAnnotations_args args = new storeTopKeyValueAnnotations_args();
args.setService_name(service_name);
args.setAnnotations(annotations);
args.write(prot);
prot.writeMessageEnd();
}
public void getResult() throws StoreAggregatesException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
(new Client(prot)).recv_storeTopKeyValueAnnotations();
}
}
public void storeDependencies(String service_name, List endpoints, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
checkReady();
storeDependencies_call method_call = new storeDependencies_call(service_name, endpoints, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class storeDependencies_call extends org.apache.thrift.async.TAsyncMethodCall {
private String service_name;
private List endpoints;
public storeDependencies_call(String service_name, List endpoints, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.service_name = service_name;
this.endpoints = endpoints;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("storeDependencies", org.apache.thrift.protocol.TMessageType.CALL, 0));
storeDependencies_args args = new storeDependencies_args();
args.setService_name(service_name);
args.setEndpoints(endpoints);
args.write(prot);
prot.writeMessageEnd();
}
public void getResult() throws StoreAggregatesException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
(new Client(prot)).recv_storeDependencies();
}
}
}
public static class Processor extends com.twitter.zipkin.gen.scribe.Processor implements org.apache.thrift.TProcessor {
private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
public Processor(I iface) {
super(iface, getProcessMap(new HashMap>()));
}
protected Processor(I iface, Map> processMap) {
super(iface, getProcessMap(processMap));
}
private static Map> getProcessMap(Map> processMap) {
processMap.put("storeTopAnnotations", new storeTopAnnotations());
processMap.put("storeTopKeyValueAnnotations", new storeTopKeyValueAnnotations());
processMap.put("storeDependencies", new storeDependencies());
return processMap;
}
private static class storeTopAnnotations extends org.apache.thrift.ProcessFunction {
public storeTopAnnotations() {
super("storeTopAnnotations");
}
protected storeTopAnnotations_args getEmptyArgsInstance() {
return new storeTopAnnotations_args();
}
protected storeTopAnnotations_result getResult(I iface, storeTopAnnotations_args args) throws org.apache.thrift.TException {
storeTopAnnotations_result result = new storeTopAnnotations_result();
try {
iface.storeTopAnnotations(args.service_name, args.annotations);
} catch (StoreAggregatesException e) {
result.e = e;
}
return result;
}
}
private static class storeTopKeyValueAnnotations extends org.apache.thrift.ProcessFunction {
public storeTopKeyValueAnnotations() {
super("storeTopKeyValueAnnotations");
}
protected storeTopKeyValueAnnotations_args getEmptyArgsInstance() {
return new storeTopKeyValueAnnotations_args();
}
protected storeTopKeyValueAnnotations_result getResult(I iface, storeTopKeyValueAnnotations_args args) throws org.apache.thrift.TException {
storeTopKeyValueAnnotations_result result = new storeTopKeyValueAnnotations_result();
try {
iface.storeTopKeyValueAnnotations(args.service_name, args.annotations);
} catch (StoreAggregatesException e) {
result.e = e;
}
return result;
}
}
private static class storeDependencies extends org.apache.thrift.ProcessFunction {
public storeDependencies() {
super("storeDependencies");
}
protected storeDependencies_args getEmptyArgsInstance() {
return new storeDependencies_args();
}
protected storeDependencies_result getResult(I iface, storeDependencies_args args) throws org.apache.thrift.TException {
storeDependencies_result result = new storeDependencies_result();
try {
iface.storeDependencies(args.service_name, args.endpoints);
} catch (StoreAggregatesException e) {
result.e = e;
}
return result;
}
}
}
public static class storeTopAnnotations_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("storeTopAnnotations_args");
private static final org.apache.thrift.protocol.TField SERVICE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("service_name", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField ANNOTATIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("annotations", org.apache.thrift.protocol.TType.LIST, (short)2);
private String service_name; // required
private List annotations; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
SERVICE_NAME((short)1, "service_name"),
ANNOTATIONS((short)2, "annotations");
private static final Map byName = new HashMap();
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: // SERVICE_NAME
return SERVICE_NAME;
case 2: // ANNOTATIONS
return ANNOTATIONS;
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.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SERVICE_NAME, new org.apache.thrift.meta_data.FieldMetaData("service_name", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.ANNOTATIONS, new org.apache.thrift.meta_data.FieldMetaData("annotations", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(storeTopAnnotations_args.class, metaDataMap);
}
public storeTopAnnotations_args() {
}
public storeTopAnnotations_args(
String service_name,
List annotations)
{
this();
this.service_name = service_name;
this.annotations = annotations;
}
/**
* Performs a deep copy on other.
*/
public storeTopAnnotations_args(storeTopAnnotations_args other) {
if (other.isSetService_name()) {
this.service_name = other.service_name;
}
if (other.isSetAnnotations()) {
List __this__annotations = new ArrayList();
for (String other_element : other.annotations) {
__this__annotations.add(other_element);
}
this.annotations = __this__annotations;
}
}
public storeTopAnnotations_args deepCopy() {
return new storeTopAnnotations_args(this);
}
@Override
public void clear() {
this.service_name = null;
this.annotations = null;
}
public String getService_name() {
return this.service_name;
}
public storeTopAnnotations_args setService_name(String service_name) {
this.service_name = service_name;
return this;
}
public void unsetService_name() {
this.service_name = null;
}
/** Returns true if field service_name is set (has been assigned a value) and false otherwise */
public boolean isSetService_name() {
return this.service_name != null;
}
public void setService_nameIsSet(boolean value) {
if (!value) {
this.service_name = null;
}
}
public int getAnnotationsSize() {
return (this.annotations == null) ? 0 : this.annotations.size();
}
public java.util.Iterator getAnnotationsIterator() {
return (this.annotations == null) ? null : this.annotations.iterator();
}
public void addToAnnotations(String elem) {
if (this.annotations == null) {
this.annotations = new ArrayList();
}
this.annotations.add(elem);
}
public List getAnnotations() {
return this.annotations;
}
public storeTopAnnotations_args setAnnotations(List annotations) {
this.annotations = annotations;
return this;
}
public void unsetAnnotations() {
this.annotations = null;
}
/** Returns true if field annotations is set (has been assigned a value) and false otherwise */
public boolean isSetAnnotations() {
return this.annotations != null;
}
public void setAnnotationsIsSet(boolean value) {
if (!value) {
this.annotations = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SERVICE_NAME:
if (value == null) {
unsetService_name();
} else {
setService_name((String)value);
}
break;
case ANNOTATIONS:
if (value == null) {
unsetAnnotations();
} else {
setAnnotations((List)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SERVICE_NAME:
return getService_name();
case ANNOTATIONS:
return getAnnotations();
}
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 SERVICE_NAME:
return isSetService_name();
case ANNOTATIONS:
return isSetAnnotations();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof storeTopAnnotations_args)
return this.equals((storeTopAnnotations_args)that);
return false;
}
public boolean equals(storeTopAnnotations_args that) {
if (that == null)
return false;
boolean this_present_service_name = true && this.isSetService_name();
boolean that_present_service_name = true && that.isSetService_name();
if (this_present_service_name || that_present_service_name) {
if (!(this_present_service_name && that_present_service_name))
return false;
if (!this.service_name.equals(that.service_name))
return false;
}
boolean this_present_annotations = true && this.isSetAnnotations();
boolean that_present_annotations = true && that.isSetAnnotations();
if (this_present_annotations || that_present_annotations) {
if (!(this_present_annotations && that_present_annotations))
return false;
if (!this.annotations.equals(that.annotations))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(storeTopAnnotations_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
storeTopAnnotations_args typedOther = (storeTopAnnotations_args)other;
lastComparison = Boolean.valueOf(isSetService_name()).compareTo(typedOther.isSetService_name());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetService_name()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.service_name, typedOther.service_name);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetAnnotations()).compareTo(typedOther.isSetAnnotations());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetAnnotations()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.annotations, typedOther.annotations);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (field.id) {
case 1: // SERVICE_NAME
if (field.type == org.apache.thrift.protocol.TType.STRING) {
this.service_name = iprot.readString();
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
case 2: // ANNOTATIONS
if (field.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list0 = iprot.readListBegin();
this.annotations = new ArrayList(_list0.size);
for (int _i1 = 0; _i1 < _list0.size; ++_i1)
{
String _elem2; // required
_elem2 = iprot.readString();
this.annotations.add(_elem2);
}
iprot.readListEnd();
}
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
validate();
oprot.writeStructBegin(STRUCT_DESC);
if (this.service_name != null) {
oprot.writeFieldBegin(SERVICE_NAME_FIELD_DESC);
oprot.writeString(this.service_name);
oprot.writeFieldEnd();
}
if (this.annotations != null) {
oprot.writeFieldBegin(ANNOTATIONS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.annotations.size()));
for (String _iter3 : this.annotations)
{
oprot.writeString(_iter3);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("storeTopAnnotations_args(");
boolean first = true;
sb.append("service_name:");
if (this.service_name == null) {
sb.append("null");
} else {
sb.append(this.service_name);
}
first = false;
if (!first) sb.append(", ");
sb.append("annotations:");
if (this.annotations == null) {
sb.append("null");
} else {
sb.append(this.annotations);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.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.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
}
public static class storeTopAnnotations_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("storeTopAnnotations_result");
private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private StoreAggregatesException e; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
E((short)1, "e");
private static final Map byName = new HashMap();
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: // E
return E;
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.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(storeTopAnnotations_result.class, metaDataMap);
}
public storeTopAnnotations_result() {
}
public storeTopAnnotations_result(
StoreAggregatesException e)
{
this();
this.e = e;
}
/**
* Performs a deep copy on other.
*/
public storeTopAnnotations_result(storeTopAnnotations_result other) {
if (other.isSetE()) {
this.e = new StoreAggregatesException(other.e);
}
}
public storeTopAnnotations_result deepCopy() {
return new storeTopAnnotations_result(this);
}
@Override
public void clear() {
this.e = null;
}
public StoreAggregatesException getE() {
return this.e;
}
public storeTopAnnotations_result setE(StoreAggregatesException e) {
this.e = e;
return this;
}
public void unsetE() {
this.e = null;
}
/** Returns true if field e is set (has been assigned a value) and false otherwise */
public boolean isSetE() {
return this.e != null;
}
public void setEIsSet(boolean value) {
if (!value) {
this.e = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case E:
if (value == null) {
unsetE();
} else {
setE((StoreAggregatesException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case E:
return getE();
}
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 E:
return isSetE();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof storeTopAnnotations_result)
return this.equals((storeTopAnnotations_result)that);
return false;
}
public boolean equals(storeTopAnnotations_result that) {
if (that == null)
return false;
boolean this_present_e = true && this.isSetE();
boolean that_present_e = true && that.isSetE();
if (this_present_e || that_present_e) {
if (!(this_present_e && that_present_e))
return false;
if (!this.e.equals(that.e))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(storeTopAnnotations_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
storeTopAnnotations_result typedOther = (storeTopAnnotations_result)other;
lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetE()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (field.id) {
case 1: // E
if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
this.e = new StoreAggregatesException();
this.e.read(iprot);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
oprot.writeStructBegin(STRUCT_DESC);
if (this.isSetE()) {
oprot.writeFieldBegin(E_FIELD_DESC);
this.e.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("storeTopAnnotations_result(");
boolean first = true;
sb.append("e:");
if (this.e == null) {
sb.append("null");
} else {
sb.append(this.e);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.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.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
}
public static class storeTopKeyValueAnnotations_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("storeTopKeyValueAnnotations_args");
private static final org.apache.thrift.protocol.TField SERVICE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("service_name", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField ANNOTATIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("annotations", org.apache.thrift.protocol.TType.LIST, (short)2);
private String service_name; // required
private List annotations; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
SERVICE_NAME((short)1, "service_name"),
ANNOTATIONS((short)2, "annotations");
private static final Map byName = new HashMap();
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: // SERVICE_NAME
return SERVICE_NAME;
case 2: // ANNOTATIONS
return ANNOTATIONS;
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.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SERVICE_NAME, new org.apache.thrift.meta_data.FieldMetaData("service_name", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.ANNOTATIONS, new org.apache.thrift.meta_data.FieldMetaData("annotations", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(storeTopKeyValueAnnotations_args.class, metaDataMap);
}
public storeTopKeyValueAnnotations_args() {
}
public storeTopKeyValueAnnotations_args(
String service_name,
List annotations)
{
this();
this.service_name = service_name;
this.annotations = annotations;
}
/**
* Performs a deep copy on other.
*/
public storeTopKeyValueAnnotations_args(storeTopKeyValueAnnotations_args other) {
if (other.isSetService_name()) {
this.service_name = other.service_name;
}
if (other.isSetAnnotations()) {
List __this__annotations = new ArrayList();
for (String other_element : other.annotations) {
__this__annotations.add(other_element);
}
this.annotations = __this__annotations;
}
}
public storeTopKeyValueAnnotations_args deepCopy() {
return new storeTopKeyValueAnnotations_args(this);
}
@Override
public void clear() {
this.service_name = null;
this.annotations = null;
}
public String getService_name() {
return this.service_name;
}
public storeTopKeyValueAnnotations_args setService_name(String service_name) {
this.service_name = service_name;
return this;
}
public void unsetService_name() {
this.service_name = null;
}
/** Returns true if field service_name is set (has been assigned a value) and false otherwise */
public boolean isSetService_name() {
return this.service_name != null;
}
public void setService_nameIsSet(boolean value) {
if (!value) {
this.service_name = null;
}
}
public int getAnnotationsSize() {
return (this.annotations == null) ? 0 : this.annotations.size();
}
public java.util.Iterator getAnnotationsIterator() {
return (this.annotations == null) ? null : this.annotations.iterator();
}
public void addToAnnotations(String elem) {
if (this.annotations == null) {
this.annotations = new ArrayList();
}
this.annotations.add(elem);
}
public List getAnnotations() {
return this.annotations;
}
public storeTopKeyValueAnnotations_args setAnnotations(List annotations) {
this.annotations = annotations;
return this;
}
public void unsetAnnotations() {
this.annotations = null;
}
/** Returns true if field annotations is set (has been assigned a value) and false otherwise */
public boolean isSetAnnotations() {
return this.annotations != null;
}
public void setAnnotationsIsSet(boolean value) {
if (!value) {
this.annotations = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SERVICE_NAME:
if (value == null) {
unsetService_name();
} else {
setService_name((String)value);
}
break;
case ANNOTATIONS:
if (value == null) {
unsetAnnotations();
} else {
setAnnotations((List)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SERVICE_NAME:
return getService_name();
case ANNOTATIONS:
return getAnnotations();
}
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 SERVICE_NAME:
return isSetService_name();
case ANNOTATIONS:
return isSetAnnotations();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof storeTopKeyValueAnnotations_args)
return this.equals((storeTopKeyValueAnnotations_args)that);
return false;
}
public boolean equals(storeTopKeyValueAnnotations_args that) {
if (that == null)
return false;
boolean this_present_service_name = true && this.isSetService_name();
boolean that_present_service_name = true && that.isSetService_name();
if (this_present_service_name || that_present_service_name) {
if (!(this_present_service_name && that_present_service_name))
return false;
if (!this.service_name.equals(that.service_name))
return false;
}
boolean this_present_annotations = true && this.isSetAnnotations();
boolean that_present_annotations = true && that.isSetAnnotations();
if (this_present_annotations || that_present_annotations) {
if (!(this_present_annotations && that_present_annotations))
return false;
if (!this.annotations.equals(that.annotations))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(storeTopKeyValueAnnotations_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
storeTopKeyValueAnnotations_args typedOther = (storeTopKeyValueAnnotations_args)other;
lastComparison = Boolean.valueOf(isSetService_name()).compareTo(typedOther.isSetService_name());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetService_name()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.service_name, typedOther.service_name);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetAnnotations()).compareTo(typedOther.isSetAnnotations());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetAnnotations()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.annotations, typedOther.annotations);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (field.id) {
case 1: // SERVICE_NAME
if (field.type == org.apache.thrift.protocol.TType.STRING) {
this.service_name = iprot.readString();
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
case 2: // ANNOTATIONS
if (field.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list4 = iprot.readListBegin();
this.annotations = new ArrayList(_list4.size);
for (int _i5 = 0; _i5 < _list4.size; ++_i5)
{
String _elem6; // required
_elem6 = iprot.readString();
this.annotations.add(_elem6);
}
iprot.readListEnd();
}
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
validate();
oprot.writeStructBegin(STRUCT_DESC);
if (this.service_name != null) {
oprot.writeFieldBegin(SERVICE_NAME_FIELD_DESC);
oprot.writeString(this.service_name);
oprot.writeFieldEnd();
}
if (this.annotations != null) {
oprot.writeFieldBegin(ANNOTATIONS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.annotations.size()));
for (String _iter7 : this.annotations)
{
oprot.writeString(_iter7);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("storeTopKeyValueAnnotations_args(");
boolean first = true;
sb.append("service_name:");
if (this.service_name == null) {
sb.append("null");
} else {
sb.append(this.service_name);
}
first = false;
if (!first) sb.append(", ");
sb.append("annotations:");
if (this.annotations == null) {
sb.append("null");
} else {
sb.append(this.annotations);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.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.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
}
public static class storeTopKeyValueAnnotations_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("storeTopKeyValueAnnotations_result");
private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private StoreAggregatesException e; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
E((short)1, "e");
private static final Map byName = new HashMap();
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: // E
return E;
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.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(storeTopKeyValueAnnotations_result.class, metaDataMap);
}
public storeTopKeyValueAnnotations_result() {
}
public storeTopKeyValueAnnotations_result(
StoreAggregatesException e)
{
this();
this.e = e;
}
/**
* Performs a deep copy on other.
*/
public storeTopKeyValueAnnotations_result(storeTopKeyValueAnnotations_result other) {
if (other.isSetE()) {
this.e = new StoreAggregatesException(other.e);
}
}
public storeTopKeyValueAnnotations_result deepCopy() {
return new storeTopKeyValueAnnotations_result(this);
}
@Override
public void clear() {
this.e = null;
}
public StoreAggregatesException getE() {
return this.e;
}
public storeTopKeyValueAnnotations_result setE(StoreAggregatesException e) {
this.e = e;
return this;
}
public void unsetE() {
this.e = null;
}
/** Returns true if field e is set (has been assigned a value) and false otherwise */
public boolean isSetE() {
return this.e != null;
}
public void setEIsSet(boolean value) {
if (!value) {
this.e = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case E:
if (value == null) {
unsetE();
} else {
setE((StoreAggregatesException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case E:
return getE();
}
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 E:
return isSetE();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof storeTopKeyValueAnnotations_result)
return this.equals((storeTopKeyValueAnnotations_result)that);
return false;
}
public boolean equals(storeTopKeyValueAnnotations_result that) {
if (that == null)
return false;
boolean this_present_e = true && this.isSetE();
boolean that_present_e = true && that.isSetE();
if (this_present_e || that_present_e) {
if (!(this_present_e && that_present_e))
return false;
if (!this.e.equals(that.e))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(storeTopKeyValueAnnotations_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
storeTopKeyValueAnnotations_result typedOther = (storeTopKeyValueAnnotations_result)other;
lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetE()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (field.id) {
case 1: // E
if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
this.e = new StoreAggregatesException();
this.e.read(iprot);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
oprot.writeStructBegin(STRUCT_DESC);
if (this.isSetE()) {
oprot.writeFieldBegin(E_FIELD_DESC);
this.e.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("storeTopKeyValueAnnotations_result(");
boolean first = true;
sb.append("e:");
if (this.e == null) {
sb.append("null");
} else {
sb.append(this.e);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.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.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
}
public static class storeDependencies_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("storeDependencies_args");
private static final org.apache.thrift.protocol.TField SERVICE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("service_name", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField ENDPOINTS_FIELD_DESC = new org.apache.thrift.protocol.TField("endpoints", org.apache.thrift.protocol.TType.LIST, (short)2);
private String service_name; // required
private List endpoints; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
SERVICE_NAME((short)1, "service_name"),
ENDPOINTS((short)2, "endpoints");
private static final Map byName = new HashMap();
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: // SERVICE_NAME
return SERVICE_NAME;
case 2: // ENDPOINTS
return ENDPOINTS;
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.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SERVICE_NAME, new org.apache.thrift.meta_data.FieldMetaData("service_name", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.ENDPOINTS, new org.apache.thrift.meta_data.FieldMetaData("endpoints", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(storeDependencies_args.class, metaDataMap);
}
public storeDependencies_args() {
}
public storeDependencies_args(
String service_name,
List endpoints)
{
this();
this.service_name = service_name;
this.endpoints = endpoints;
}
/**
* Performs a deep copy on other.
*/
public storeDependencies_args(storeDependencies_args other) {
if (other.isSetService_name()) {
this.service_name = other.service_name;
}
if (other.isSetEndpoints()) {
List __this__endpoints = new ArrayList();
for (String other_element : other.endpoints) {
__this__endpoints.add(other_element);
}
this.endpoints = __this__endpoints;
}
}
public storeDependencies_args deepCopy() {
return new storeDependencies_args(this);
}
@Override
public void clear() {
this.service_name = null;
this.endpoints = null;
}
public String getService_name() {
return this.service_name;
}
public storeDependencies_args setService_name(String service_name) {
this.service_name = service_name;
return this;
}
public void unsetService_name() {
this.service_name = null;
}
/** Returns true if field service_name is set (has been assigned a value) and false otherwise */
public boolean isSetService_name() {
return this.service_name != null;
}
public void setService_nameIsSet(boolean value) {
if (!value) {
this.service_name = null;
}
}
public int getEndpointsSize() {
return (this.endpoints == null) ? 0 : this.endpoints.size();
}
public java.util.Iterator getEndpointsIterator() {
return (this.endpoints == null) ? null : this.endpoints.iterator();
}
public void addToEndpoints(String elem) {
if (this.endpoints == null) {
this.endpoints = new ArrayList();
}
this.endpoints.add(elem);
}
public List getEndpoints() {
return this.endpoints;
}
public storeDependencies_args setEndpoints(List endpoints) {
this.endpoints = endpoints;
return this;
}
public void unsetEndpoints() {
this.endpoints = null;
}
/** Returns true if field endpoints is set (has been assigned a value) and false otherwise */
public boolean isSetEndpoints() {
return this.endpoints != null;
}
public void setEndpointsIsSet(boolean value) {
if (!value) {
this.endpoints = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SERVICE_NAME:
if (value == null) {
unsetService_name();
} else {
setService_name((String)value);
}
break;
case ENDPOINTS:
if (value == null) {
unsetEndpoints();
} else {
setEndpoints((List)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SERVICE_NAME:
return getService_name();
case ENDPOINTS:
return getEndpoints();
}
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 SERVICE_NAME:
return isSetService_name();
case ENDPOINTS:
return isSetEndpoints();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof storeDependencies_args)
return this.equals((storeDependencies_args)that);
return false;
}
public boolean equals(storeDependencies_args that) {
if (that == null)
return false;
boolean this_present_service_name = true && this.isSetService_name();
boolean that_present_service_name = true && that.isSetService_name();
if (this_present_service_name || that_present_service_name) {
if (!(this_present_service_name && that_present_service_name))
return false;
if (!this.service_name.equals(that.service_name))
return false;
}
boolean this_present_endpoints = true && this.isSetEndpoints();
boolean that_present_endpoints = true && that.isSetEndpoints();
if (this_present_endpoints || that_present_endpoints) {
if (!(this_present_endpoints && that_present_endpoints))
return false;
if (!this.endpoints.equals(that.endpoints))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(storeDependencies_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
storeDependencies_args typedOther = (storeDependencies_args)other;
lastComparison = Boolean.valueOf(isSetService_name()).compareTo(typedOther.isSetService_name());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetService_name()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.service_name, typedOther.service_name);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetEndpoints()).compareTo(typedOther.isSetEndpoints());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetEndpoints()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.endpoints, typedOther.endpoints);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (field.id) {
case 1: // SERVICE_NAME
if (field.type == org.apache.thrift.protocol.TType.STRING) {
this.service_name = iprot.readString();
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
case 2: // ENDPOINTS
if (field.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list8 = iprot.readListBegin();
this.endpoints = new ArrayList(_list8.size);
for (int _i9 = 0; _i9 < _list8.size; ++_i9)
{
String _elem10; // required
_elem10 = iprot.readString();
this.endpoints.add(_elem10);
}
iprot.readListEnd();
}
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
validate();
oprot.writeStructBegin(STRUCT_DESC);
if (this.service_name != null) {
oprot.writeFieldBegin(SERVICE_NAME_FIELD_DESC);
oprot.writeString(this.service_name);
oprot.writeFieldEnd();
}
if (this.endpoints != null) {
oprot.writeFieldBegin(ENDPOINTS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.endpoints.size()));
for (String _iter11 : this.endpoints)
{
oprot.writeString(_iter11);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("storeDependencies_args(");
boolean first = true;
sb.append("service_name:");
if (this.service_name == null) {
sb.append("null");
} else {
sb.append(this.service_name);
}
first = false;
if (!first) sb.append(", ");
sb.append("endpoints:");
if (this.endpoints == null) {
sb.append("null");
} else {
sb.append(this.endpoints);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.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.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
}
public static class storeDependencies_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("storeDependencies_result");
private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private StoreAggregatesException e; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
E((short)1, "e");
private static final Map byName = new HashMap();
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: // E
return E;
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.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(storeDependencies_result.class, metaDataMap);
}
public storeDependencies_result() {
}
public storeDependencies_result(
StoreAggregatesException e)
{
this();
this.e = e;
}
/**
* Performs a deep copy on other.
*/
public storeDependencies_result(storeDependencies_result other) {
if (other.isSetE()) {
this.e = new StoreAggregatesException(other.e);
}
}
public storeDependencies_result deepCopy() {
return new storeDependencies_result(this);
}
@Override
public void clear() {
this.e = null;
}
public StoreAggregatesException getE() {
return this.e;
}
public storeDependencies_result setE(StoreAggregatesException e) {
this.e = e;
return this;
}
public void unsetE() {
this.e = null;
}
/** Returns true if field e is set (has been assigned a value) and false otherwise */
public boolean isSetE() {
return this.e != null;
}
public void setEIsSet(boolean value) {
if (!value) {
this.e = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case E:
if (value == null) {
unsetE();
} else {
setE((StoreAggregatesException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case E:
return getE();
}
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 E:
return isSetE();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof storeDependencies_result)
return this.equals((storeDependencies_result)that);
return false;
}
public boolean equals(storeDependencies_result that) {
if (that == null)
return false;
boolean this_present_e = true && this.isSetE();
boolean that_present_e = true && that.isSetE();
if (this_present_e || that_present_e) {
if (!(this_present_e && that_present_e))
return false;
if (!this.e.equals(that.e))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(storeDependencies_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
storeDependencies_result typedOther = (storeDependencies_result)other;
lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetE()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (field.id) {
case 1: // E
if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
this.e = new StoreAggregatesException();
this.e.read(iprot);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
oprot.writeStructBegin(STRUCT_DESC);
if (this.isSetE()) {
oprot.writeFieldBegin(E_FIELD_DESC);
this.e.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("storeDependencies_result(");
boolean first = true;
sb.append("e:");
if (this.e == null) {
sb.append("null");
} else {
sb.append(this.e);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.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.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
}
}