當前位置: 首頁>>代碼示例>>Java>>正文


Java TTupleProtocol.writeI64方法代碼示例

本文整理匯總了Java中org.apache.thrift.protocol.TTupleProtocol.writeI64方法的典型用法代碼示例。如果您正苦於以下問題:Java TTupleProtocol.writeI64方法的具體用法?Java TTupleProtocol.writeI64怎麽用?Java TTupleProtocol.writeI64使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.apache.thrift.protocol.TTupleProtocol的用法示例。


在下文中一共展示了TTupleProtocol.writeI64方法的11個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: write

import org.apache.thrift.protocol.TTupleProtocol; //導入方法依賴的package包/類
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TimerValue struct) throws org.apache.thrift.TException {
  TTupleProtocol oprot = (TTupleProtocol) prot;
  BitSet optionals = new BitSet();
  if (struct.isSetI64Value()) {
    optionals.set(0);
  }
  if (struct.isSetDValue()) {
    optionals.set(1);
  }
  oprot.writeBitSet(optionals, 2);
  if (struct.isSetI64Value()) {
    oprot.writeI64(struct.i64Value);
  }
  if (struct.isSetDValue()) {
    oprot.writeDouble(struct.dValue);
  }
}
 
開發者ID:uber-java,項目名稱:tally,代碼行數:19,代碼來源:TimerValue.java

示例2: write

import org.apache.thrift.protocol.TTupleProtocol; //導入方法依賴的package包/類
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, GaugeValue struct) throws org.apache.thrift.TException {
  TTupleProtocol oprot = (TTupleProtocol) prot;
  BitSet optionals = new BitSet();
  if (struct.isSetI64Value()) {
    optionals.set(0);
  }
  if (struct.isSetDValue()) {
    optionals.set(1);
  }
  oprot.writeBitSet(optionals, 2);
  if (struct.isSetI64Value()) {
    oprot.writeI64(struct.i64Value);
  }
  if (struct.isSetDValue()) {
    oprot.writeDouble(struct.dValue);
  }
}
 
開發者ID:uber-java,項目名稱:tally,代碼行數:19,代碼來源:GaugeValue.java

示例3: write

import org.apache.thrift.protocol.TTupleProtocol; //導入方法依賴的package包/類
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, atomicIncrement_result struct) throws org.apache.thrift.TException {
  TTupleProtocol oprot = (TTupleProtocol) prot;
  BitSet optionals = new BitSet();
  if (struct.isSetSuccess()) {
    optionals.set(0);
  }
  if (struct.isSetIo()) {
    optionals.set(1);
  }
  if (struct.isSetIa()) {
    optionals.set(2);
  }
  oprot.writeBitSet(optionals, 3);
  if (struct.isSetSuccess()) {
    oprot.writeI64(struct.success);
  }
  if (struct.isSetIo()) {
    struct.io.write(oprot);
  }
  if (struct.isSetIa()) {
    struct.ia.write(oprot);
  }
}
 
開發者ID:fengchen8086,項目名稱:ditb,代碼行數:25,代碼來源:Hbase.java

示例4: write

import org.apache.thrift.protocol.TTupleProtocol; //導入方法依賴的package包/類
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, SwitchPortTuple struct) throws org.apache.thrift.TException {
  TTupleProtocol oprot = (TTupleProtocol) prot;
  BitSet optionals = new BitSet();
  if (struct.isSetDpid()) {
    optionals.set(0);
  }
  if (struct.isSetPort()) {
    optionals.set(1);
  }
  oprot.writeBitSet(optionals, 2);
  if (struct.isSetDpid()) {
    oprot.writeI64(struct.dpid);
  }
  if (struct.isSetPort()) {
    oprot.writeI16(struct.port);
  }
}
 
開發者ID:xuraylei,項目名稱:fresco_floodlight,代碼行數:19,代碼來源:SwitchPortTuple.java

示例5: write

import org.apache.thrift.protocol.TTupleProtocol; //導入方法依賴的package包/類
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TColumnValue struct) throws org.apache.thrift.TException {
  TTupleProtocol oprot = (TTupleProtocol) prot;
  oprot.writeBinary(struct.family);
  oprot.writeBinary(struct.qualifier);
  oprot.writeBinary(struct.value);
  BitSet optionals = new BitSet();
  if (struct.isSetTimestamp()) {
    optionals.set(0);
  }
  if (struct.isSetTags()) {
    optionals.set(1);
  }
  oprot.writeBitSet(optionals, 2);
  if (struct.isSetTimestamp()) {
    oprot.writeI64(struct.timestamp);
  }
  if (struct.isSetTags()) {
    oprot.writeBinary(struct.tags);
  }
}
 
開發者ID:fengchen8086,項目名稱:ditb,代碼行數:22,代碼來源:TColumnValue.java

示例6: write

import org.apache.thrift.protocol.TTupleProtocol; //導入方法依賴的package包/類
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, CountValue struct) throws org.apache.thrift.TException {
  TTupleProtocol oprot = (TTupleProtocol) prot;
  BitSet optionals = new BitSet();
  if (struct.isSetI64Value()) {
    optionals.set(0);
  }
  oprot.writeBitSet(optionals, 1);
  if (struct.isSetI64Value()) {
    oprot.writeI64(struct.i64Value);
  }
}
 
開發者ID:uber-java,項目名稱:tally,代碼行數:13,代碼來源:CountValue.java

示例7: write

import org.apache.thrift.protocol.TTupleProtocol; //導入方法依賴的package包/類
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, Metric struct) throws org.apache.thrift.TException {
  TTupleProtocol oprot = (TTupleProtocol) prot;
  BitSet optionals = new BitSet();
  if (struct.isSetName()) {
    optionals.set(0);
  }
  if (struct.isSetMetricValue()) {
    optionals.set(1);
  }
  if (struct.isSetTimestamp()) {
    optionals.set(2);
  }
  if (struct.isSetTags()) {
    optionals.set(3);
  }
  oprot.writeBitSet(optionals, 4);
  if (struct.isSetName()) {
    oprot.writeString(struct.name);
  }
  if (struct.isSetMetricValue()) {
    struct.metricValue.write(oprot);
  }
  if (struct.isSetTimestamp()) {
    oprot.writeI64(struct.timestamp);
  }
  if (struct.isSetTags()) {
    {
      oprot.writeI32(struct.tags.size());
      for (MetricTag _iter4 : struct.tags)
      {
        _iter4.write(oprot);
      }
    }
  }
}
 
開發者ID:uber-java,項目名稱:tally,代碼行數:37,代碼來源:Metric.java

示例8: write

import org.apache.thrift.protocol.TTupleProtocol; //導入方法依賴的package包/類
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, gettimestamp_args struct) throws org.apache.thrift.TException {
  TTupleProtocol oprot = (TTupleProtocol) prot;
  BitSet optionals = new BitSet();
  if (struct.isSetMytimestamp()) {
    optionals.set(0);
  }
  oprot.writeBitSet(optionals, 1);
  if (struct.isSetMytimestamp()) {
    oprot.writeI64(struct.mytimestamp);
  }
}
 
開發者ID:weizhenyi,項目名稱:leaf-snowflake,代碼行數:13,代碼來源:leafrpc.java

示例9: write

import org.apache.thrift.protocol.TTupleProtocol; //導入方法依賴的package包/類
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TColumnIncrement struct) throws org.apache.thrift.TException {
  TTupleProtocol oprot = (TTupleProtocol) prot;
  oprot.writeBinary(struct.family);
  oprot.writeBinary(struct.qualifier);
  BitSet optionals = new BitSet();
  if (struct.isSetAmount()) {
    optionals.set(0);
  }
  oprot.writeBitSet(optionals, 1);
  if (struct.isSetAmount()) {
    oprot.writeI64(struct.amount);
  }
}
 
開發者ID:fengchen8086,項目名稱:ditb,代碼行數:15,代碼來源:TColumnIncrement.java

示例10: write

import org.apache.thrift.protocol.TTupleProtocol; //導入方法依賴的package包/類
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TDelete struct) throws org.apache.thrift.TException {
  TTupleProtocol oprot = (TTupleProtocol) prot;
  oprot.writeBinary(struct.row);
  BitSet optionals = new BitSet();
  if (struct.isSetColumns()) {
    optionals.set(0);
  }
  if (struct.isSetTimestamp()) {
    optionals.set(1);
  }
  if (struct.isSetDeleteType()) {
    optionals.set(2);
  }
  if (struct.isSetAttributes()) {
    optionals.set(3);
  }
  if (struct.isSetDurability()) {
    optionals.set(4);
  }
  oprot.writeBitSet(optionals, 5);
  if (struct.isSetColumns()) {
    {
      oprot.writeI32(struct.columns.size());
      for (TColumn _iter61 : struct.columns)
      {
        _iter61.write(oprot);
      }
    }
  }
  if (struct.isSetTimestamp()) {
    oprot.writeI64(struct.timestamp);
  }
  if (struct.isSetDeleteType()) {
    oprot.writeI32(struct.deleteType.getValue());
  }
  if (struct.isSetAttributes()) {
    {
      oprot.writeI32(struct.attributes.size());
      for (Map.Entry<ByteBuffer, ByteBuffer> _iter62 : struct.attributes.entrySet())
      {
        oprot.writeBinary(_iter62.getKey());
        oprot.writeBinary(_iter62.getValue());
      }
    }
  }
  if (struct.isSetDurability()) {
    oprot.writeI32(struct.durability.getValue());
  }
}
 
開發者ID:fengchen8086,項目名稱:ditb,代碼行數:51,代碼來源:TDelete.java

示例11: write

import org.apache.thrift.protocol.TTupleProtocol; //導入方法依賴的package包/類
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TTimeRange struct) throws org.apache.thrift.TException {
  TTupleProtocol oprot = (TTupleProtocol) prot;
  oprot.writeI64(struct.minStamp);
  oprot.writeI64(struct.maxStamp);
}
 
開發者ID:fengchen8086,項目名稱:ditb,代碼行數:7,代碼來源:TTimeRange.java


注:本文中的org.apache.thrift.protocol.TTupleProtocol.writeI64方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。