本文整理匯總了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);
}
}
示例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);
}
}
示例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);
}
}
示例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);
}
}
示例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);
}
}
示例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);
}
}
示例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);
}
}
}
}
示例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);
}
}
示例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);
}
}
示例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());
}
}
示例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);
}