当前位置: 首页>>代码示例>>Java>>正文


Java TProtocolException类代码示例

本文整理汇总了Java中org.apache.thrift.protocol.TProtocolException的典型用法代码示例。如果您正苦于以下问题:Java TProtocolException类的具体用法?Java TProtocolException怎么用?Java TProtocolException使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


TProtocolException类属于org.apache.thrift.protocol包,在下文中一共展示了TProtocolException类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: validate

import org.apache.thrift.protocol.TProtocolException; //导入依赖的package包/类
public void validate() throws org.apache.thrift.TException {
  // check for required fields
  if (header == null) {
    throw new org.apache.thrift.protocol.TProtocolException("Required field 'header' was not present! Struct: " + toString());
  }
  if (storeName == null) {
    throw new org.apache.thrift.protocol.TProtocolException("Required field 'storeName' was not present! Struct: " + toString());
  }
  if (key == null) {
    throw new org.apache.thrift.protocol.TProtocolException("Required field 'key' was not present! Struct: " + toString());
  }
  // check for sub-struct validity
  if (header != null) {
    header.validate();
  }
  if (version != null) {
    version.validate();
  }
}
 
开发者ID:xuraylei,项目名称:fresco_floodlight,代码行数:20,代码来源:DeleteRequestMessage.java

示例2: validate

import org.apache.thrift.protocol.TProtocolException; //导入依赖的package包/类
public void validate() throws org.apache.thrift.TException {
  // check for required fields
  if (header == null) {
    throw new org.apache.thrift.protocol.TProtocolException("Required field 'header' was not present! Struct: " + toString());
  }
  if (store == null) {
    throw new org.apache.thrift.protocol.TProtocolException("Required field 'store' was not present! Struct: " + toString());
  }
  // check for sub-struct validity
  if (header != null) {
    header.validate();
  }
  if (store != null) {
    store.validate();
  }
}
 
开发者ID:xuraylei,项目名称:fresco_floodlight,代码行数:17,代码来源:SyncOfferMessage.java

示例3: validate

import org.apache.thrift.protocol.TProtocolException; //导入依赖的package包/类
public void validate() throws org.apache.thrift.TException {
  // check for required fields
  if (header == null) {
    throw new org.apache.thrift.protocol.TProtocolException("Required field 'header' was not present! Struct: " + toString());
  }
  if (node == null) {
    throw new org.apache.thrift.protocol.TProtocolException("Required field 'node' was not present! Struct: " + toString());
  }
  // check for sub-struct validity
  if (header != null) {
    header.validate();
  }
  if (node != null) {
    node.validate();
  }
}
 
开发者ID:xuraylei,项目名称:fresco_floodlight,代码行数:17,代码来源:ClusterJoinRequestMessage.java

示例4: validate

import org.apache.thrift.protocol.TProtocolException; //导入依赖的package包/类
public void validate() throws org.apache.thrift.TException {
  // check for required fields
  if (header == null) {
    throw new org.apache.thrift.protocol.TProtocolException("Required field 'header' was not present! Struct: " + toString());
  }
  if (storeName == null) {
    throw new org.apache.thrift.protocol.TProtocolException("Required field 'storeName' was not present! Struct: " + toString());
  }
  if (key == null) {
    throw new org.apache.thrift.protocol.TProtocolException("Required field 'key' was not present! Struct: " + toString());
  }
  // check for sub-struct validity
  if (header != null) {
    header.validate();
  }
  if (versionedValue != null) {
    versionedValue.validate();
  }
}
 
开发者ID:xuraylei,项目名称:fresco_floodlight,代码行数:20,代码来源:PutRequestMessage.java

示例5: validate

import org.apache.thrift.protocol.TProtocolException; //导入依赖的package包/类
public void validate() throws org.apache.thrift.TException {
  // check for required fields
  if (header == null) {
    throw new org.apache.thrift.protocol.TProtocolException("Required field 'header' was not present! Struct: " + toString());
  }
  if (storeName == null) {
    throw new org.apache.thrift.protocol.TProtocolException("Required field 'storeName' was not present! Struct: " + toString());
  }
  if (key == null) {
    throw new org.apache.thrift.protocol.TProtocolException("Required field 'key' was not present! Struct: " + toString());
  }
  // check for sub-struct validity
  if (header != null) {
    header.validate();
  }
}
 
开发者ID:xuraylei,项目名称:fresco_floodlight,代码行数:17,代码来源:GetRequestMessage.java

示例6: validate

import org.apache.thrift.protocol.TProtocolException; //导入依赖的package包/类
public void validate() throws org.apache.thrift.TException {
  // check for required fields
  if (status == null) {
    throw new org.apache.thrift.protocol.TProtocolException("Required field 'status' was not present! Struct: " + toString());
  }
  if (serverProtocolVersion == null) {
    throw new org.apache.thrift.protocol.TProtocolException("Required field 'serverProtocolVersion' was not present! Struct: " + toString());
  }
  // check for sub-struct validity
  if (status != null) {
    status.validate();
  }
  if (sessionHandle != null) {
    sessionHandle.validate();
  }
}
 
开发者ID:thulab,项目名称:iotdb-jdbc,代码行数:17,代码来源:TSOpenSessionResp.java

示例7: validate

import org.apache.thrift.protocol.TProtocolException; //导入依赖的package包/类
public void validate() throws org.apache.thrift.TException {
  // check for required fields
  if (table == null) {
    throw new org.apache.thrift.protocol.TProtocolException("Required field 'table' was not present! Struct: " + toString());
  }
  if (row == null) {
    throw new org.apache.thrift.protocol.TProtocolException("Required field 'row' was not present! Struct: " + toString());
  }
  if (family == null) {
    throw new org.apache.thrift.protocol.TProtocolException("Required field 'family' was not present! Struct: " + toString());
  }
  if (qualifier == null) {
    throw new org.apache.thrift.protocol.TProtocolException("Required field 'qualifier' was not present! Struct: " + toString());
  }
  if (tput == null) {
    throw new org.apache.thrift.protocol.TProtocolException("Required field 'tput' was not present! Struct: " + toString());
  }
  // check for sub-struct validity
  if (tput != null) {
    tput.validate();
  }
}
 
开发者ID:fengchen8086,项目名称:ditb,代码行数:23,代码来源:THBaseService.java

示例8: tupleSchemeReadValue

import org.apache.thrift.protocol.TProtocolException; //导入依赖的package包/类
@Override
protected Object tupleSchemeReadValue(org.apache.thrift.protocol.TProtocol iprot, short fieldID) throws org.apache.thrift.TException {
  _Fields setField = _Fields.findByThriftId(fieldID);
  if (setField != null) {
    switch (setField) {
      case PUT:
        TPut put;
        put = new TPut();
        put.read(iprot);
        return put;
      case DELETE_SINGLE:
        TDelete deleteSingle;
        deleteSingle = new TDelete();
        deleteSingle.read(iprot);
        return deleteSingle;
      default:
        throw new IllegalStateException("setField wasn't null, but didn't match any of the case statements!");
    }
  } else {
    throw new TProtocolException("Couldn't find a field with field id " + fieldID);
  }
}
 
开发者ID:fengchen8086,项目名称:ditb,代码行数:23,代码来源:TMutation.java

示例9: validate

import org.apache.thrift.protocol.TProtocolException; //导入依赖的package包/类
public void validate() throws org.apache.thrift.TException {
  // check for required fields
  if (header == null) {
    throw new org.apache.thrift.protocol.TProtocolException("Required field 'header' was not present! Struct: " + toString());
  }
  // check for sub-struct validity
  if (header != null) {
    header.validate();
  }
  if (error != null) {
    error.validate();
  }
}
 
开发者ID:xuraylei,项目名称:fresco_floodlight,代码行数:14,代码来源:GetResponseMessage.java

示例10: validate

import org.apache.thrift.protocol.TProtocolException; //导入依赖的package包/类
public void validate() throws org.apache.thrift.TException {
  // check for required fields
  if (header == null) {
    throw new org.apache.thrift.protocol.TProtocolException("Required field 'header' was not present! Struct: " + toString());
  }
  // check for sub-struct validity
  if (header != null) {
    header.validate();
  }
}
 
开发者ID:xuraylei,项目名称:fresco_floodlight,代码行数:11,代码来源:EchoReplyMessage.java

示例11: validate

import org.apache.thrift.protocol.TProtocolException; //导入依赖的package包/类
public void validate() throws org.apache.thrift.TException {
  // check for required fields
  if (key == null) {
    throw new org.apache.thrift.protocol.TProtocolException("Required field 'key' was not present! Struct: " + toString());
  }
  if (versions == null) {
    throw new org.apache.thrift.protocol.TProtocolException("Required field 'versions' was not present! Struct: " + toString());
  }
  // check for sub-struct validity
}
 
开发者ID:xuraylei,项目名称:fresco_floodlight,代码行数:11,代码来源:KeyedVersions.java

示例12: validate

import org.apache.thrift.protocol.TProtocolException; //导入依赖的package包/类
public void validate() throws org.apache.thrift.TException {
  // check for required fields
  if (version == null) {
    throw new org.apache.thrift.protocol.TProtocolException("Required field 'version' was not present! Struct: " + toString());
  }
  // check for sub-struct validity
  if (version != null) {
    version.validate();
  }
}
 
开发者ID:xuraylei,项目名称:fresco_floodlight,代码行数:11,代码来源:VersionedValue.java

示例13: validate

import org.apache.thrift.protocol.TProtocolException; //导入依赖的package包/类
public void validate() throws org.apache.thrift.TException {
  // check for required fields
  if (key == null) {
    throw new org.apache.thrift.protocol.TProtocolException("Required field 'key' was not present! Struct: " + toString());
  }
  if (values == null) {
    throw new org.apache.thrift.protocol.TProtocolException("Required field 'values' was not present! Struct: " + toString());
  }
  // check for sub-struct validity
}
 
开发者ID:xuraylei,项目名称:fresco_floodlight,代码行数:11,代码来源:KeyedValues.java

示例14: validate

import org.apache.thrift.protocol.TProtocolException; //导入依赖的package包/类
public void validate() throws org.apache.thrift.TException {
  // check for required fields
  if (storeName == null) {
    throw new org.apache.thrift.protocol.TProtocolException("Required field 'storeName' was not present! Struct: " + toString());
  }
  // check for sub-struct validity
}
 
开发者ID:xuraylei,项目名称:fresco_floodlight,代码行数:8,代码来源:Store.java

示例15: read

import org.apache.thrift.protocol.TProtocolException; //导入依赖的package包/类
public void read(org.apache.thrift.protocol.TProtocol iprot, getScannerRows_args 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: // SCANNER_ID
        if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
          struct.scannerId = iprot.readI32();
          struct.setScannerIdIsSet(true);
        } else { 
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
        }
        break;
      case 2: // NUM_ROWS
        if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
          struct.numRows = iprot.readI32();
          struct.setNumRowsIsSet(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
  if (!struct.isSetScannerId()) {
    throw new org.apache.thrift.protocol.TProtocolException("Required field 'scannerId' was not found in serialized data! Struct: " + toString());
  }
  struct.validate();
}
 
开发者ID:fengchen8086,项目名称:ditb,代码行数:40,代码来源:THBaseService.java


注:本文中的org.apache.thrift.protocol.TProtocolException类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。