예제 #1
0
 @Override
 public void read(org.apache.thrift.protocol.TProtocol prot, ResourceJobManager struct)
     throws org.apache.thrift.TException {
   TTupleProtocol iprot = (TTupleProtocol) prot;
   struct.resourceJobManagerId = iprot.readString();
   struct.setResourceJobManagerIdIsSet(true);
   struct.resourceJobManagerType =
       org.apache.airavata.model.appcatalog.computeresource.ResourceJobManagerType.findByValue(
           iprot.readI32());
   struct.setResourceJobManagerTypeIsSet(true);
   BitSet incoming = iprot.readBitSet(3);
   if (incoming.get(0)) {
     struct.pushMonitoringEndpoint = iprot.readString();
     struct.setPushMonitoringEndpointIsSet(true);
   }
   if (incoming.get(1)) {
     struct.jobManagerBinPath = iprot.readString();
     struct.setJobManagerBinPathIsSet(true);
   }
   if (incoming.get(2)) {
     {
       org.apache.thrift.protocol.TMap _map6 =
           new org.apache.thrift.protocol.TMap(
               org.apache.thrift.protocol.TType.I32,
               org.apache.thrift.protocol.TType.STRING,
               iprot.readI32());
       struct.jobManagerCommands = new HashMap<JobManagerCommand, String>(2 * _map6.size);
       JobManagerCommand _key7;
       String _val8;
       for (int _i9 = 0; _i9 < _map6.size; ++_i9) {
         _key7 =
             org.apache.airavata.model.appcatalog.computeresource.JobManagerCommand.findByValue(
                 iprot.readI32());
         _val8 = iprot.readString();
         struct.jobManagerCommands.put(_key7, _val8);
       }
     }
     struct.setJobManagerCommandsIsSet(true);
   }
 }
예제 #2
0
 public void read(org.apache.thrift.protocol.TProtocol iprot, ResourceJobManager 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: // RESOURCE_JOB_MANAGER_ID
         if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
           struct.resourceJobManagerId = iprot.readString();
           struct.setResourceJobManagerIdIsSet(true);
         } else {
           org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
         }
         break;
       case 2: // RESOURCE_JOB_MANAGER_TYPE
         if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
           struct.resourceJobManagerType =
               org.apache.airavata.model.appcatalog.computeresource.ResourceJobManagerType
                   .findByValue(iprot.readI32());
           struct.setResourceJobManagerTypeIsSet(true);
         } else {
           org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
         }
         break;
       case 3: // PUSH_MONITORING_ENDPOINT
         if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
           struct.pushMonitoringEndpoint = iprot.readString();
           struct.setPushMonitoringEndpointIsSet(true);
         } else {
           org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
         }
         break;
       case 4: // JOB_MANAGER_BIN_PATH
         if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
           struct.jobManagerBinPath = iprot.readString();
           struct.setJobManagerBinPathIsSet(true);
         } else {
           org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
         }
         break;
       case 5: // JOB_MANAGER_COMMANDS
         if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
           {
             org.apache.thrift.protocol.TMap _map0 = iprot.readMapBegin();
             struct.jobManagerCommands = new HashMap<JobManagerCommand, String>(2 * _map0.size);
             JobManagerCommand _key1;
             String _val2;
             for (int _i3 = 0; _i3 < _map0.size; ++_i3) {
               _key1 =
                   org.apache.airavata.model.appcatalog.computeresource.JobManagerCommand
                       .findByValue(iprot.readI32());
               _val2 = iprot.readString();
               struct.jobManagerCommands.put(_key1, _val2);
             }
             iprot.readMapEnd();
           }
           struct.setJobManagerCommandsIsSet(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();
   struct.validate();
 }