Subversion Repositories SmartDukaan

Rev

Rev 11982 | Rev 12722 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 11982 Rev 12696
Line 355... Line 355...
355
 
355
 
356
    public boolean changePrivateDealUserStatus(long userId, boolean isActive) throws org.apache.thrift.TException;
356
    public boolean changePrivateDealUserStatus(long userId, boolean isActive) throws org.apache.thrift.TException;
357
 
357
 
358
    public PrivateDealUser getPrivateDealUser(long userId) throws org.apache.thrift.TException;
358
    public PrivateDealUser getPrivateDealUser(long userId) throws org.apache.thrift.TException;
359
 
359
 
-
 
360
    public Map<String,String> registerCounter(Counter counter, long userId) throws org.apache.thrift.TException;
-
 
361
 
360
  }
362
  }
361
 
363
 
362
  public interface AsyncIface extends in.shop2020.generic.GenericService .AsyncIface {
364
  public interface AsyncIface extends in.shop2020.generic.GenericService .AsyncIface {
363
 
365
 
364
    public void createAnonymousUser(String jsessionId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createAnonymousUser_call> resultHandler) throws org.apache.thrift.TException;
366
    public void createAnonymousUser(String jsessionId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createAnonymousUser_call> resultHandler) throws org.apache.thrift.TException;
Line 515... Line 517...
515
 
517
 
516
    public void changePrivateDealUserStatus(long userId, boolean isActive, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.changePrivateDealUserStatus_call> resultHandler) throws org.apache.thrift.TException;
518
    public void changePrivateDealUserStatus(long userId, boolean isActive, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.changePrivateDealUserStatus_call> resultHandler) throws org.apache.thrift.TException;
517
 
519
 
518
    public void getPrivateDealUser(long userId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getPrivateDealUser_call> resultHandler) throws org.apache.thrift.TException;
520
    public void getPrivateDealUser(long userId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getPrivateDealUser_call> resultHandler) throws org.apache.thrift.TException;
519
 
521
 
-
 
522
    public void registerCounter(Counter counter, long userId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.registerCounter_call> resultHandler) throws org.apache.thrift.TException;
-
 
523
 
520
  }
524
  }
521
 
525
 
522
  public static class Client extends in.shop2020.generic.GenericService.Client implements Iface {
526
  public static class Client extends in.shop2020.generic.GenericService.Client implements Iface {
523
    public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
527
    public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
524
      public Factory() {}
528
      public Factory() {}
Line 2534... Line 2538...
2534
        return result.success;
2538
        return result.success;
2535
      }
2539
      }
2536
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPrivateDealUser failed: unknown result");
2540
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPrivateDealUser failed: unknown result");
2537
    }
2541
    }
2538
 
2542
 
-
 
2543
    public Map<String,String> registerCounter(Counter counter, long userId) throws org.apache.thrift.TException
-
 
2544
    {
-
 
2545
      send_registerCounter(counter, userId);
-
 
2546
      return recv_registerCounter();
-
 
2547
    }
-
 
2548
 
-
 
2549
    public void send_registerCounter(Counter counter, long userId) throws org.apache.thrift.TException
-
 
2550
    {
-
 
2551
      registerCounter_args args = new registerCounter_args();
-
 
2552
      args.setCounter(counter);
-
 
2553
      args.setUserId(userId);
-
 
2554
      sendBase("registerCounter", args);
-
 
2555
    }
-
 
2556
 
-
 
2557
    public Map<String,String> recv_registerCounter() throws org.apache.thrift.TException
-
 
2558
    {
-
 
2559
      registerCounter_result result = new registerCounter_result();
-
 
2560
      receiveBase(result, "registerCounter");
-
 
2561
      if (result.isSetSuccess()) {
-
 
2562
        return result.success;
-
 
2563
      }
-
 
2564
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "registerCounter failed: unknown result");
-
 
2565
    }
-
 
2566
 
2539
  }
2567
  }
2540
  public static class AsyncClient extends in.shop2020.generic.GenericService.AsyncClient implements AsyncIface {
2568
  public static class AsyncClient extends in.shop2020.generic.GenericService.AsyncClient implements AsyncIface {
2541
    public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
2569
    public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
2542
      private org.apache.thrift.async.TAsyncClientManager clientManager;
2570
      private org.apache.thrift.async.TAsyncClientManager clientManager;
2543
      private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
2571
      private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
Line 5248... Line 5276...
5248
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
5276
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
5249
        return (new Client(prot)).recv_getPrivateDealUser();
5277
        return (new Client(prot)).recv_getPrivateDealUser();
5250
      }
5278
      }
5251
    }
5279
    }
5252
 
5280
 
-
 
5281
    public void registerCounter(Counter counter, long userId, org.apache.thrift.async.AsyncMethodCallback<registerCounter_call> resultHandler) throws org.apache.thrift.TException {
-
 
5282
      checkReady();
-
 
5283
      registerCounter_call method_call = new registerCounter_call(counter, userId, resultHandler, this, ___protocolFactory, ___transport);
-
 
5284
      this.___currentMethod = method_call;
-
 
5285
      ___manager.call(method_call);
-
 
5286
    }
-
 
5287
 
-
 
5288
    public static class registerCounter_call extends org.apache.thrift.async.TAsyncMethodCall {
-
 
5289
      private Counter counter;
-
 
5290
      private long userId;
-
 
5291
      public registerCounter_call(Counter counter, long userId, org.apache.thrift.async.AsyncMethodCallback<registerCounter_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
-
 
5292
        super(client, protocolFactory, transport, resultHandler, false);
-
 
5293
        this.counter = counter;
-
 
5294
        this.userId = userId;
-
 
5295
      }
-
 
5296
 
-
 
5297
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
-
 
5298
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("registerCounter", org.apache.thrift.protocol.TMessageType.CALL, 0));
-
 
5299
        registerCounter_args args = new registerCounter_args();
-
 
5300
        args.setCounter(counter);
-
 
5301
        args.setUserId(userId);
-
 
5302
        args.write(prot);
-
 
5303
        prot.writeMessageEnd();
-
 
5304
      }
-
 
5305
 
-
 
5306
      public Map<String,String> getResult() throws org.apache.thrift.TException {
-
 
5307
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
-
 
5308
          throw new IllegalStateException("Method call not finished!");
-
 
5309
        }
-
 
5310
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
-
 
5311
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
-
 
5312
        return (new Client(prot)).recv_registerCounter();
-
 
5313
      }
-
 
5314
    }
-
 
5315
 
5253
  }
5316
  }
5254
 
5317
 
5255
  public static class Processor<I extends Iface> extends in.shop2020.generic.GenericService.Processor implements org.apache.thrift.TProcessor {
5318
  public static class Processor<I extends Iface> extends in.shop2020.generic.GenericService.Processor implements org.apache.thrift.TProcessor {
5256
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
5319
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
5257
    public Processor(I iface) {
5320
    public Processor(I iface) {
Line 5339... Line 5402...
5339
      processMap.put("validateCartPlus", new validateCartPlus());
5402
      processMap.put("validateCartPlus", new validateCartPlus());
5340
      processMap.put("isPrivateDealUser", new isPrivateDealUser());
5403
      processMap.put("isPrivateDealUser", new isPrivateDealUser());
5341
      processMap.put("addPrivateDealUser", new addPrivateDealUser());
5404
      processMap.put("addPrivateDealUser", new addPrivateDealUser());
5342
      processMap.put("changePrivateDealUserStatus", new changePrivateDealUserStatus());
5405
      processMap.put("changePrivateDealUserStatus", new changePrivateDealUserStatus());
5343
      processMap.put("getPrivateDealUser", new getPrivateDealUser());
5406
      processMap.put("getPrivateDealUser", new getPrivateDealUser());
-
 
5407
      processMap.put("registerCounter", new registerCounter());
5344
      return processMap;
5408
      return processMap;
5345
    }
5409
    }
5346
 
5410
 
5347
    private static class createAnonymousUser<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createAnonymousUser_args> {
5411
    private static class createAnonymousUser<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createAnonymousUser_args> {
5348
      public createAnonymousUser() {
5412
      public createAnonymousUser() {
Line 6855... Line 6919...
6855
        result.success = iface.getPrivateDealUser(args.userId);
6919
        result.success = iface.getPrivateDealUser(args.userId);
6856
        return result;
6920
        return result;
6857
      }
6921
      }
6858
    }
6922
    }
6859
 
6923
 
-
 
6924
    private static class registerCounter<I extends Iface> extends org.apache.thrift.ProcessFunction<I, registerCounter_args> {
-
 
6925
      public registerCounter() {
-
 
6926
        super("registerCounter");
-
 
6927
      }
-
 
6928
 
-
 
6929
      protected registerCounter_args getEmptyArgsInstance() {
-
 
6930
        return new registerCounter_args();
-
 
6931
      }
-
 
6932
 
-
 
6933
      protected registerCounter_result getResult(I iface, registerCounter_args args) throws org.apache.thrift.TException {
-
 
6934
        registerCounter_result result = new registerCounter_result();
-
 
6935
        result.success = iface.registerCounter(args.counter, args.userId);
-
 
6936
        return result;
-
 
6937
      }
-
 
6938
    }
-
 
6939
 
6860
  }
6940
  }
6861
 
6941
 
6862
  public static class createAnonymousUser_args implements org.apache.thrift.TBase<createAnonymousUser_args, createAnonymousUser_args._Fields>, java.io.Serializable, Cloneable   {
6942
  public static class createAnonymousUser_args implements org.apache.thrift.TBase<createAnonymousUser_args, createAnonymousUser_args._Fields>, java.io.Serializable, Cloneable   {
6863
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createAnonymousUser_args");
6943
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createAnonymousUser_args");
6864
 
6944
 
Line 63048... Line 63128...
63048
      boolean first = true;
63128
      boolean first = true;
63049
 
63129
 
63050
      sb.append("success:");
63130
      sb.append("success:");
63051
      if (this.success == null) {
63131
      if (this.success == null) {
63052
        sb.append("null");
63132
        sb.append("null");
-
 
63133
      } else {
-
 
63134
        sb.append(this.success);
-
 
63135
      }
-
 
63136
      first = false;
-
 
63137
      sb.append(")");
-
 
63138
      return sb.toString();
-
 
63139
    }
-
 
63140
 
-
 
63141
    public void validate() throws org.apache.thrift.TException {
-
 
63142
      // check for required fields
-
 
63143
    }
-
 
63144
 
-
 
63145
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-
 
63146
      try {
-
 
63147
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-
 
63148
      } catch (org.apache.thrift.TException te) {
-
 
63149
        throw new java.io.IOException(te);
-
 
63150
      }
-
 
63151
    }
-
 
63152
 
-
 
63153
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-
 
63154
      try {
-
 
63155
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-
 
63156
      } catch (org.apache.thrift.TException te) {
-
 
63157
        throw new java.io.IOException(te);
-
 
63158
      }
-
 
63159
    }
-
 
63160
 
-
 
63161
  }
-
 
63162
 
-
 
63163
  public static class registerCounter_args implements org.apache.thrift.TBase<registerCounter_args, registerCounter_args._Fields>, java.io.Serializable, Cloneable   {
-
 
63164
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("registerCounter_args");
-
 
63165
 
-
 
63166
    private static final org.apache.thrift.protocol.TField COUNTER_FIELD_DESC = new org.apache.thrift.protocol.TField("counter", org.apache.thrift.protocol.TType.STRUCT, (short)1);
-
 
63167
    private static final org.apache.thrift.protocol.TField USER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("userId", org.apache.thrift.protocol.TType.I64, (short)2);
-
 
63168
 
-
 
63169
    private Counter counter; // required
-
 
63170
    private long userId; // required
-
 
63171
 
-
 
63172
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
63173
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-
 
63174
      COUNTER((short)1, "counter"),
-
 
63175
      USER_ID((short)2, "userId");
-
 
63176
 
-
 
63177
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
63178
 
-
 
63179
      static {
-
 
63180
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
63181
          byName.put(field.getFieldName(), field);
-
 
63182
        }
-
 
63183
      }
-
 
63184
 
-
 
63185
      /**
-
 
63186
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
63187
       */
-
 
63188
      public static _Fields findByThriftId(int fieldId) {
-
 
63189
        switch(fieldId) {
-
 
63190
          case 1: // COUNTER
-
 
63191
            return COUNTER;
-
 
63192
          case 2: // USER_ID
-
 
63193
            return USER_ID;
-
 
63194
          default:
-
 
63195
            return null;
-
 
63196
        }
-
 
63197
      }
-
 
63198
 
-
 
63199
      /**
-
 
63200
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
63201
       * if it is not found.
-
 
63202
       */
-
 
63203
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
63204
        _Fields fields = findByThriftId(fieldId);
-
 
63205
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
63206
        return fields;
-
 
63207
      }
-
 
63208
 
-
 
63209
      /**
-
 
63210
       * Find the _Fields constant that matches name, or null if its not found.
-
 
63211
       */
-
 
63212
      public static _Fields findByName(String name) {
-
 
63213
        return byName.get(name);
-
 
63214
      }
-
 
63215
 
-
 
63216
      private final short _thriftId;
-
 
63217
      private final String _fieldName;
-
 
63218
 
-
 
63219
      _Fields(short thriftId, String fieldName) {
-
 
63220
        _thriftId = thriftId;
-
 
63221
        _fieldName = fieldName;
-
 
63222
      }
-
 
63223
 
-
 
63224
      public short getThriftFieldId() {
-
 
63225
        return _thriftId;
-
 
63226
      }
-
 
63227
 
-
 
63228
      public String getFieldName() {
-
 
63229
        return _fieldName;
-
 
63230
      }
-
 
63231
    }
-
 
63232
 
-
 
63233
    // isset id assignments
-
 
63234
    private static final int __USERID_ISSET_ID = 0;
-
 
63235
    private BitSet __isset_bit_vector = new BitSet(1);
-
 
63236
 
-
 
63237
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
 
63238
    static {
-
 
63239
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-
 
63240
      tmpMap.put(_Fields.COUNTER, new org.apache.thrift.meta_data.FieldMetaData("counter", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
63241
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Counter.class)));
-
 
63242
      tmpMap.put(_Fields.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
63243
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
-
 
63244
      metaDataMap = Collections.unmodifiableMap(tmpMap);
-
 
63245
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(registerCounter_args.class, metaDataMap);
-
 
63246
    }
-
 
63247
 
-
 
63248
    public registerCounter_args() {
-
 
63249
    }
-
 
63250
 
-
 
63251
    public registerCounter_args(
-
 
63252
      Counter counter,
-
 
63253
      long userId)
-
 
63254
    {
-
 
63255
      this();
-
 
63256
      this.counter = counter;
-
 
63257
      this.userId = userId;
-
 
63258
      setUserIdIsSet(true);
-
 
63259
    }
-
 
63260
 
-
 
63261
    /**
-
 
63262
     * Performs a deep copy on <i>other</i>.
-
 
63263
     */
-
 
63264
    public registerCounter_args(registerCounter_args other) {
-
 
63265
      __isset_bit_vector.clear();
-
 
63266
      __isset_bit_vector.or(other.__isset_bit_vector);
-
 
63267
      if (other.isSetCounter()) {
-
 
63268
        this.counter = new Counter(other.counter);
-
 
63269
      }
-
 
63270
      this.userId = other.userId;
-
 
63271
    }
-
 
63272
 
-
 
63273
    public registerCounter_args deepCopy() {
-
 
63274
      return new registerCounter_args(this);
-
 
63275
    }
-
 
63276
 
-
 
63277
    @Override
-
 
63278
    public void clear() {
-
 
63279
      this.counter = null;
-
 
63280
      setUserIdIsSet(false);
-
 
63281
      this.userId = 0;
-
 
63282
    }
-
 
63283
 
-
 
63284
    public Counter getCounter() {
-
 
63285
      return this.counter;
-
 
63286
    }
-
 
63287
 
-
 
63288
    public void setCounter(Counter counter) {
-
 
63289
      this.counter = counter;
-
 
63290
    }
-
 
63291
 
-
 
63292
    public void unsetCounter() {
-
 
63293
      this.counter = null;
-
 
63294
    }
-
 
63295
 
-
 
63296
    /** Returns true if field counter is set (has been assigned a value) and false otherwise */
-
 
63297
    public boolean isSetCounter() {
-
 
63298
      return this.counter != null;
-
 
63299
    }
-
 
63300
 
-
 
63301
    public void setCounterIsSet(boolean value) {
-
 
63302
      if (!value) {
-
 
63303
        this.counter = null;
-
 
63304
      }
-
 
63305
    }
-
 
63306
 
-
 
63307
    public long getUserId() {
-
 
63308
      return this.userId;
-
 
63309
    }
-
 
63310
 
-
 
63311
    public void setUserId(long userId) {
-
 
63312
      this.userId = userId;
-
 
63313
      setUserIdIsSet(true);
-
 
63314
    }
-
 
63315
 
-
 
63316
    public void unsetUserId() {
-
 
63317
      __isset_bit_vector.clear(__USERID_ISSET_ID);
-
 
63318
    }
-
 
63319
 
-
 
63320
    /** Returns true if field userId is set (has been assigned a value) and false otherwise */
-
 
63321
    public boolean isSetUserId() {
-
 
63322
      return __isset_bit_vector.get(__USERID_ISSET_ID);
-
 
63323
    }
-
 
63324
 
-
 
63325
    public void setUserIdIsSet(boolean value) {
-
 
63326
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
-
 
63327
    }
-
 
63328
 
-
 
63329
    public void setFieldValue(_Fields field, Object value) {
-
 
63330
      switch (field) {
-
 
63331
      case COUNTER:
-
 
63332
        if (value == null) {
-
 
63333
          unsetCounter();
-
 
63334
        } else {
-
 
63335
          setCounter((Counter)value);
-
 
63336
        }
-
 
63337
        break;
-
 
63338
 
-
 
63339
      case USER_ID:
-
 
63340
        if (value == null) {
-
 
63341
          unsetUserId();
-
 
63342
        } else {
-
 
63343
          setUserId((Long)value);
-
 
63344
        }
-
 
63345
        break;
-
 
63346
 
-
 
63347
      }
-
 
63348
    }
-
 
63349
 
-
 
63350
    public Object getFieldValue(_Fields field) {
-
 
63351
      switch (field) {
-
 
63352
      case COUNTER:
-
 
63353
        return getCounter();
-
 
63354
 
-
 
63355
      case USER_ID:
-
 
63356
        return Long.valueOf(getUserId());
-
 
63357
 
-
 
63358
      }
-
 
63359
      throw new IllegalStateException();
-
 
63360
    }
-
 
63361
 
-
 
63362
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
-
 
63363
    public boolean isSet(_Fields field) {
-
 
63364
      if (field == null) {
-
 
63365
        throw new IllegalArgumentException();
-
 
63366
      }
-
 
63367
 
-
 
63368
      switch (field) {
-
 
63369
      case COUNTER:
-
 
63370
        return isSetCounter();
-
 
63371
      case USER_ID:
-
 
63372
        return isSetUserId();
-
 
63373
      }
-
 
63374
      throw new IllegalStateException();
-
 
63375
    }
-
 
63376
 
-
 
63377
    @Override
-
 
63378
    public boolean equals(Object that) {
-
 
63379
      if (that == null)
-
 
63380
        return false;
-
 
63381
      if (that instanceof registerCounter_args)
-
 
63382
        return this.equals((registerCounter_args)that);
-
 
63383
      return false;
-
 
63384
    }
-
 
63385
 
-
 
63386
    public boolean equals(registerCounter_args that) {
-
 
63387
      if (that == null)
-
 
63388
        return false;
-
 
63389
 
-
 
63390
      boolean this_present_counter = true && this.isSetCounter();
-
 
63391
      boolean that_present_counter = true && that.isSetCounter();
-
 
63392
      if (this_present_counter || that_present_counter) {
-
 
63393
        if (!(this_present_counter && that_present_counter))
-
 
63394
          return false;
-
 
63395
        if (!this.counter.equals(that.counter))
-
 
63396
          return false;
-
 
63397
      }
-
 
63398
 
-
 
63399
      boolean this_present_userId = true;
-
 
63400
      boolean that_present_userId = true;
-
 
63401
      if (this_present_userId || that_present_userId) {
-
 
63402
        if (!(this_present_userId && that_present_userId))
-
 
63403
          return false;
-
 
63404
        if (this.userId != that.userId)
-
 
63405
          return false;
-
 
63406
      }
-
 
63407
 
-
 
63408
      return true;
-
 
63409
    }
-
 
63410
 
-
 
63411
    @Override
-
 
63412
    public int hashCode() {
-
 
63413
      return 0;
-
 
63414
    }
-
 
63415
 
-
 
63416
    public int compareTo(registerCounter_args other) {
-
 
63417
      if (!getClass().equals(other.getClass())) {
-
 
63418
        return getClass().getName().compareTo(other.getClass().getName());
-
 
63419
      }
-
 
63420
 
-
 
63421
      int lastComparison = 0;
-
 
63422
      registerCounter_args typedOther = (registerCounter_args)other;
-
 
63423
 
-
 
63424
      lastComparison = Boolean.valueOf(isSetCounter()).compareTo(typedOther.isSetCounter());
-
 
63425
      if (lastComparison != 0) {
-
 
63426
        return lastComparison;
-
 
63427
      }
-
 
63428
      if (isSetCounter()) {
-
 
63429
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.counter, typedOther.counter);
-
 
63430
        if (lastComparison != 0) {
-
 
63431
          return lastComparison;
-
 
63432
        }
-
 
63433
      }
-
 
63434
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(typedOther.isSetUserId());
-
 
63435
      if (lastComparison != 0) {
-
 
63436
        return lastComparison;
-
 
63437
      }
-
 
63438
      if (isSetUserId()) {
-
 
63439
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userId, typedOther.userId);
-
 
63440
        if (lastComparison != 0) {
-
 
63441
          return lastComparison;
-
 
63442
        }
-
 
63443
      }
-
 
63444
      return 0;
-
 
63445
    }
-
 
63446
 
-
 
63447
    public _Fields fieldForId(int fieldId) {
-
 
63448
      return _Fields.findByThriftId(fieldId);
-
 
63449
    }
-
 
63450
 
-
 
63451
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-
 
63452
      org.apache.thrift.protocol.TField field;
-
 
63453
      iprot.readStructBegin();
-
 
63454
      while (true)
-
 
63455
      {
-
 
63456
        field = iprot.readFieldBegin();
-
 
63457
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-
 
63458
          break;
-
 
63459
        }
-
 
63460
        switch (field.id) {
-
 
63461
          case 1: // COUNTER
-
 
63462
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
-
 
63463
              this.counter = new Counter();
-
 
63464
              this.counter.read(iprot);
-
 
63465
            } else { 
-
 
63466
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
63467
            }
-
 
63468
            break;
-
 
63469
          case 2: // USER_ID
-
 
63470
            if (field.type == org.apache.thrift.protocol.TType.I64) {
-
 
63471
              this.userId = iprot.readI64();
-
 
63472
              setUserIdIsSet(true);
-
 
63473
            } else { 
-
 
63474
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
63475
            }
-
 
63476
            break;
-
 
63477
          default:
-
 
63478
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
63479
        }
-
 
63480
        iprot.readFieldEnd();
-
 
63481
      }
-
 
63482
      iprot.readStructEnd();
-
 
63483
      validate();
-
 
63484
    }
-
 
63485
 
-
 
63486
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-
 
63487
      validate();
-
 
63488
 
-
 
63489
      oprot.writeStructBegin(STRUCT_DESC);
-
 
63490
      if (this.counter != null) {
-
 
63491
        oprot.writeFieldBegin(COUNTER_FIELD_DESC);
-
 
63492
        this.counter.write(oprot);
-
 
63493
        oprot.writeFieldEnd();
-
 
63494
      }
-
 
63495
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
-
 
63496
      oprot.writeI64(this.userId);
-
 
63497
      oprot.writeFieldEnd();
-
 
63498
      oprot.writeFieldStop();
-
 
63499
      oprot.writeStructEnd();
-
 
63500
    }
-
 
63501
 
-
 
63502
    @Override
-
 
63503
    public String toString() {
-
 
63504
      StringBuilder sb = new StringBuilder("registerCounter_args(");
-
 
63505
      boolean first = true;
-
 
63506
 
-
 
63507
      sb.append("counter:");
-
 
63508
      if (this.counter == null) {
-
 
63509
        sb.append("null");
-
 
63510
      } else {
-
 
63511
        sb.append(this.counter);
-
 
63512
      }
-
 
63513
      first = false;
-
 
63514
      if (!first) sb.append(", ");
-
 
63515
      sb.append("userId:");
-
 
63516
      sb.append(this.userId);
-
 
63517
      first = false;
-
 
63518
      sb.append(")");
-
 
63519
      return sb.toString();
-
 
63520
    }
-
 
63521
 
-
 
63522
    public void validate() throws org.apache.thrift.TException {
-
 
63523
      // check for required fields
-
 
63524
    }
-
 
63525
 
-
 
63526
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-
 
63527
      try {
-
 
63528
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-
 
63529
      } catch (org.apache.thrift.TException te) {
-
 
63530
        throw new java.io.IOException(te);
-
 
63531
      }
-
 
63532
    }
-
 
63533
 
-
 
63534
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-
 
63535
      try {
-
 
63536
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
-
 
63537
        __isset_bit_vector = new BitSet(1);
-
 
63538
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-
 
63539
      } catch (org.apache.thrift.TException te) {
-
 
63540
        throw new java.io.IOException(te);
-
 
63541
      }
-
 
63542
    }
-
 
63543
 
-
 
63544
  }
-
 
63545
 
-
 
63546
  public static class registerCounter_result implements org.apache.thrift.TBase<registerCounter_result, registerCounter_result._Fields>, java.io.Serializable, Cloneable   {
-
 
63547
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("registerCounter_result");
-
 
63548
 
-
 
63549
    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.MAP, (short)0);
-
 
63550
 
-
 
63551
    private Map<String,String> success; // required
-
 
63552
 
-
 
63553
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
63554
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-
 
63555
      SUCCESS((short)0, "success");
-
 
63556
 
-
 
63557
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
63558
 
-
 
63559
      static {
-
 
63560
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
63561
          byName.put(field.getFieldName(), field);
-
 
63562
        }
-
 
63563
      }
-
 
63564
 
-
 
63565
      /**
-
 
63566
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
63567
       */
-
 
63568
      public static _Fields findByThriftId(int fieldId) {
-
 
63569
        switch(fieldId) {
-
 
63570
          case 0: // SUCCESS
-
 
63571
            return SUCCESS;
-
 
63572
          default:
-
 
63573
            return null;
-
 
63574
        }
-
 
63575
      }
-
 
63576
 
-
 
63577
      /**
-
 
63578
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
63579
       * if it is not found.
-
 
63580
       */
-
 
63581
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
63582
        _Fields fields = findByThriftId(fieldId);
-
 
63583
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
63584
        return fields;
-
 
63585
      }
-
 
63586
 
-
 
63587
      /**
-
 
63588
       * Find the _Fields constant that matches name, or null if its not found.
-
 
63589
       */
-
 
63590
      public static _Fields findByName(String name) {
-
 
63591
        return byName.get(name);
-
 
63592
      }
-
 
63593
 
-
 
63594
      private final short _thriftId;
-
 
63595
      private final String _fieldName;
-
 
63596
 
-
 
63597
      _Fields(short thriftId, String fieldName) {
-
 
63598
        _thriftId = thriftId;
-
 
63599
        _fieldName = fieldName;
-
 
63600
      }
-
 
63601
 
-
 
63602
      public short getThriftFieldId() {
-
 
63603
        return _thriftId;
-
 
63604
      }
-
 
63605
 
-
 
63606
      public String getFieldName() {
-
 
63607
        return _fieldName;
-
 
63608
      }
-
 
63609
    }
-
 
63610
 
-
 
63611
    // isset id assignments
-
 
63612
 
-
 
63613
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
 
63614
    static {
-
 
63615
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-
 
63616
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
63617
          new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, 
-
 
63618
              new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), 
-
 
63619
              new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
-
 
63620
      metaDataMap = Collections.unmodifiableMap(tmpMap);
-
 
63621
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(registerCounter_result.class, metaDataMap);
-
 
63622
    }
-
 
63623
 
-
 
63624
    public registerCounter_result() {
-
 
63625
    }
-
 
63626
 
-
 
63627
    public registerCounter_result(
-
 
63628
      Map<String,String> success)
-
 
63629
    {
-
 
63630
      this();
-
 
63631
      this.success = success;
-
 
63632
    }
-
 
63633
 
-
 
63634
    /**
-
 
63635
     * Performs a deep copy on <i>other</i>.
-
 
63636
     */
-
 
63637
    public registerCounter_result(registerCounter_result other) {
-
 
63638
      if (other.isSetSuccess()) {
-
 
63639
        Map<String,String> __this__success = new HashMap<String,String>();
-
 
63640
        for (Map.Entry<String, String> other_element : other.success.entrySet()) {
-
 
63641
 
-
 
63642
          String other_element_key = other_element.getKey();
-
 
63643
          String other_element_value = other_element.getValue();
-
 
63644
 
-
 
63645
          String __this__success_copy_key = other_element_key;
-
 
63646
 
-
 
63647
          String __this__success_copy_value = other_element_value;
-
 
63648
 
-
 
63649
          __this__success.put(__this__success_copy_key, __this__success_copy_value);
-
 
63650
        }
-
 
63651
        this.success = __this__success;
-
 
63652
      }
-
 
63653
    }
-
 
63654
 
-
 
63655
    public registerCounter_result deepCopy() {
-
 
63656
      return new registerCounter_result(this);
-
 
63657
    }
-
 
63658
 
-
 
63659
    @Override
-
 
63660
    public void clear() {
-
 
63661
      this.success = null;
-
 
63662
    }
-
 
63663
 
-
 
63664
    public int getSuccessSize() {
-
 
63665
      return (this.success == null) ? 0 : this.success.size();
-
 
63666
    }
-
 
63667
 
-
 
63668
    public void putToSuccess(String key, String val) {
-
 
63669
      if (this.success == null) {
-
 
63670
        this.success = new HashMap<String,String>();
-
 
63671
      }
-
 
63672
      this.success.put(key, val);
-
 
63673
    }
-
 
63674
 
-
 
63675
    public Map<String,String> getSuccess() {
-
 
63676
      return this.success;
-
 
63677
    }
-
 
63678
 
-
 
63679
    public void setSuccess(Map<String,String> success) {
-
 
63680
      this.success = success;
-
 
63681
    }
-
 
63682
 
-
 
63683
    public void unsetSuccess() {
-
 
63684
      this.success = null;
-
 
63685
    }
-
 
63686
 
-
 
63687
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
-
 
63688
    public boolean isSetSuccess() {
-
 
63689
      return this.success != null;
-
 
63690
    }
-
 
63691
 
-
 
63692
    public void setSuccessIsSet(boolean value) {
-
 
63693
      if (!value) {
-
 
63694
        this.success = null;
-
 
63695
      }
-
 
63696
    }
-
 
63697
 
-
 
63698
    public void setFieldValue(_Fields field, Object value) {
-
 
63699
      switch (field) {
-
 
63700
      case SUCCESS:
-
 
63701
        if (value == null) {
-
 
63702
          unsetSuccess();
-
 
63703
        } else {
-
 
63704
          setSuccess((Map<String,String>)value);
-
 
63705
        }
-
 
63706
        break;
-
 
63707
 
-
 
63708
      }
-
 
63709
    }
-
 
63710
 
-
 
63711
    public Object getFieldValue(_Fields field) {
-
 
63712
      switch (field) {
-
 
63713
      case SUCCESS:
-
 
63714
        return getSuccess();
-
 
63715
 
-
 
63716
      }
-
 
63717
      throw new IllegalStateException();
-
 
63718
    }
-
 
63719
 
-
 
63720
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
-
 
63721
    public boolean isSet(_Fields field) {
-
 
63722
      if (field == null) {
-
 
63723
        throw new IllegalArgumentException();
-
 
63724
      }
-
 
63725
 
-
 
63726
      switch (field) {
-
 
63727
      case SUCCESS:
-
 
63728
        return isSetSuccess();
-
 
63729
      }
-
 
63730
      throw new IllegalStateException();
-
 
63731
    }
-
 
63732
 
-
 
63733
    @Override
-
 
63734
    public boolean equals(Object that) {
-
 
63735
      if (that == null)
-
 
63736
        return false;
-
 
63737
      if (that instanceof registerCounter_result)
-
 
63738
        return this.equals((registerCounter_result)that);
-
 
63739
      return false;
-
 
63740
    }
-
 
63741
 
-
 
63742
    public boolean equals(registerCounter_result that) {
-
 
63743
      if (that == null)
-
 
63744
        return false;
-
 
63745
 
-
 
63746
      boolean this_present_success = true && this.isSetSuccess();
-
 
63747
      boolean that_present_success = true && that.isSetSuccess();
-
 
63748
      if (this_present_success || that_present_success) {
-
 
63749
        if (!(this_present_success && that_present_success))
-
 
63750
          return false;
-
 
63751
        if (!this.success.equals(that.success))
-
 
63752
          return false;
-
 
63753
      }
-
 
63754
 
-
 
63755
      return true;
-
 
63756
    }
-
 
63757
 
-
 
63758
    @Override
-
 
63759
    public int hashCode() {
-
 
63760
      return 0;
-
 
63761
    }
-
 
63762
 
-
 
63763
    public int compareTo(registerCounter_result other) {
-
 
63764
      if (!getClass().equals(other.getClass())) {
-
 
63765
        return getClass().getName().compareTo(other.getClass().getName());
-
 
63766
      }
-
 
63767
 
-
 
63768
      int lastComparison = 0;
-
 
63769
      registerCounter_result typedOther = (registerCounter_result)other;
-
 
63770
 
-
 
63771
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
-
 
63772
      if (lastComparison != 0) {
-
 
63773
        return lastComparison;
-
 
63774
      }
-
 
63775
      if (isSetSuccess()) {
-
 
63776
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
-
 
63777
        if (lastComparison != 0) {
-
 
63778
          return lastComparison;
-
 
63779
        }
-
 
63780
      }
-
 
63781
      return 0;
-
 
63782
    }
-
 
63783
 
-
 
63784
    public _Fields fieldForId(int fieldId) {
-
 
63785
      return _Fields.findByThriftId(fieldId);
-
 
63786
    }
-
 
63787
 
-
 
63788
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-
 
63789
      org.apache.thrift.protocol.TField field;
-
 
63790
      iprot.readStructBegin();
-
 
63791
      while (true)
-
 
63792
      {
-
 
63793
        field = iprot.readFieldBegin();
-
 
63794
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-
 
63795
          break;
-
 
63796
        }
-
 
63797
        switch (field.id) {
-
 
63798
          case 0: // SUCCESS
-
 
63799
            if (field.type == org.apache.thrift.protocol.TType.MAP) {
-
 
63800
              {
-
 
63801
                org.apache.thrift.protocol.TMap _map128 = iprot.readMapBegin();
-
 
63802
                this.success = new HashMap<String,String>(2*_map128.size);
-
 
63803
                for (int _i129 = 0; _i129 < _map128.size; ++_i129)
-
 
63804
                {
-
 
63805
                  String _key130; // required
-
 
63806
                  String _val131; // required
-
 
63807
                  _key130 = iprot.readString();
-
 
63808
                  _val131 = iprot.readString();
-
 
63809
                  this.success.put(_key130, _val131);
-
 
63810
                }
-
 
63811
                iprot.readMapEnd();
-
 
63812
              }
-
 
63813
            } else { 
-
 
63814
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
63815
            }
-
 
63816
            break;
-
 
63817
          default:
-
 
63818
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
63819
        }
-
 
63820
        iprot.readFieldEnd();
-
 
63821
      }
-
 
63822
      iprot.readStructEnd();
-
 
63823
      validate();
-
 
63824
    }
-
 
63825
 
-
 
63826
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-
 
63827
      oprot.writeStructBegin(STRUCT_DESC);
-
 
63828
 
-
 
63829
      if (this.isSetSuccess()) {
-
 
63830
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
-
 
63831
        {
-
 
63832
          oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, this.success.size()));
-
 
63833
          for (Map.Entry<String, String> _iter132 : this.success.entrySet())
-
 
63834
          {
-
 
63835
            oprot.writeString(_iter132.getKey());
-
 
63836
            oprot.writeString(_iter132.getValue());
-
 
63837
          }
-
 
63838
          oprot.writeMapEnd();
-
 
63839
        }
-
 
63840
        oprot.writeFieldEnd();
-
 
63841
      }
-
 
63842
      oprot.writeFieldStop();
-
 
63843
      oprot.writeStructEnd();
-
 
63844
    }
-
 
63845
 
-
 
63846
    @Override
-
 
63847
    public String toString() {
-
 
63848
      StringBuilder sb = new StringBuilder("registerCounter_result(");
-
 
63849
      boolean first = true;
-
 
63850
 
-
 
63851
      sb.append("success:");
-
 
63852
      if (this.success == null) {
-
 
63853
        sb.append("null");
63053
      } else {
63854
      } else {
63054
        sb.append(this.success);
63855
        sb.append(this.success);
63055
      }
63856
      }
63056
      first = false;
63857
      first = false;
63057
      sb.append(")");
63858
      sb.append(")");