當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。