Example #1
0
 @Override
 public void clear() {
   this.uid = null;
   setSinceIDIsSet(false);
   this.sinceID = 0;
   setLastCrawlTimeIsSet(false);
   this.lastCrawlTime = 0;
   setLastCrawlNumIsSet(false);
   this.lastCrawlNum = 0;
 }
Example #2
0
 public UserCrawlState(String uid, long sinceID, long lastCrawlTime, short lastCrawlNum) {
   this();
   this.uid = uid;
   this.sinceID = sinceID;
   setSinceIDIsSet(true);
   this.lastCrawlTime = lastCrawlTime;
   setLastCrawlTimeIsSet(true);
   this.lastCrawlNum = lastCrawlNum;
   setLastCrawlNumIsSet(true);
 }
Example #3
0
    public void read(org.apache.thrift.protocol.TProtocol iprot, UserCrawlState struct)
        throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField schemeField;
      iprot.readStructBegin();
      while (true) {
        schemeField = iprot.readFieldBegin();
        if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
          break;
        }
        switch (schemeField.id) {
          case 1: // UID
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.uid = iprot.readString();
              struct.setUidIsSet(true);
            } else {
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 2: // SINCE_ID
            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
              struct.sinceID = iprot.readI64();
              struct.setSinceIDIsSet(true);
            } else {
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 3: // LAST_CRAWL_TIME
            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
              struct.lastCrawlTime = iprot.readI64();
              struct.setLastCrawlTimeIsSet(true);
            } else {
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 4: // LAST_CRAWL_NUM
            if (schemeField.type == org.apache.thrift.protocol.TType.I16) {
              struct.lastCrawlNum = iprot.readI16();
              struct.setLastCrawlNumIsSet(true);
            } else {
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();

      // check for required fields of primitive type, which can't be checked in the validate method
      struct.validate();
    }
Example #4
0
 @Override
 public void read(org.apache.thrift.protocol.TProtocol prot, UserCrawlState struct)
     throws org.apache.thrift.TException {
   TTupleProtocol iprot = (TTupleProtocol) prot;
   BitSet incoming = iprot.readBitSet(4);
   if (incoming.get(0)) {
     struct.uid = iprot.readString();
     struct.setUidIsSet(true);
   }
   if (incoming.get(1)) {
     struct.sinceID = iprot.readI64();
     struct.setSinceIDIsSet(true);
   }
   if (incoming.get(2)) {
     struct.lastCrawlTime = iprot.readI64();
     struct.setLastCrawlTimeIsSet(true);
   }
   if (incoming.get(3)) {
     struct.lastCrawlNum = iprot.readI16();
     struct.setLastCrawlNumIsSet(true);
   }
 }
Example #5
0
 public UserCrawlState setLastCrawlNum(short lastCrawlNum) {
   this.lastCrawlNum = lastCrawlNum;
   setLastCrawlNumIsSet(true);
   return this;
 }