本文整理匯總了Java中org.apache.thrift.protocol.TTupleProtocol.writeI32方法的典型用法代碼示例。如果您正苦於以下問題:Java TTupleProtocol.writeI32方法的具體用法?Java TTupleProtocol.writeI32怎麽用?Java TTupleProtocol.writeI32使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.apache.thrift.protocol.TTupleProtocol
的用法示例。
在下文中一共展示了TTupleProtocol.writeI32方法的13個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: write
import org.apache.thrift.protocol.TTupleProtocol; //導入方法依賴的package包/類
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, get_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);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetSuccess()) {
{
oprot.writeI32(struct.success.size());
for (TCell _iter98 : struct.success)
{
_iter98.write(oprot);
}
}
}
if (struct.isSetIo()) {
struct.io.write(oprot);
}
}
示例2: write
import org.apache.thrift.protocol.TTupleProtocol; //導入方法依賴的package包/類
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TAuthorization struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetLabels()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetLabels()) {
{
oprot.writeI32(struct.labels.size());
for (String _iter12 : struct.labels)
{
oprot.writeString(_iter12);
}
}
}
}
示例3: write
import org.apache.thrift.protocol.TTupleProtocol; //導入方法依賴的package包/類
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, BatchMutation struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetRow()) {
optionals.set(0);
}
if (struct.isSetMutations()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetRow()) {
oprot.writeBinary(struct.row);
}
if (struct.isSetMutations()) {
{
oprot.writeI32(struct.mutations.size());
for (Mutation _iter4 : struct.mutations)
{
_iter4.write(oprot);
}
}
}
}
示例4: write
import org.apache.thrift.protocol.TTupleProtocol; //導入方法依賴的package包/類
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, Store struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
oprot.writeString(struct.storeName);
BitSet optionals = new BitSet();
if (struct.isSetScope()) {
optionals.set(0);
}
if (struct.isSetPersist()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetScope()) {
oprot.writeI32(struct.scope.getValue());
}
if (struct.isSetPersist()) {
oprot.writeBool(struct.persist);
}
}
示例5: write
import org.apache.thrift.protocol.TTupleProtocol; //導入方法依賴的package包/類
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, Log_args struct)
throws TException
{
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetMessages()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetMessages()) {
{
oprot.writeI32(struct.messages.size());
for (LogEntry _iter4 : struct.messages) {
_iter4.write(oprot);
}
}
}
}
示例6: write
import org.apache.thrift.protocol.TTupleProtocol; //導入方法依賴的package包/類
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getScannerResults_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);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetSuccess()) {
{
oprot.writeI32(struct.success.size());
for (TResult _iter184 : struct.success)
{
_iter184.write(oprot);
}
}
}
if (struct.isSetIo()) {
struct.io.write(oprot);
}
}
示例7: write
import org.apache.thrift.protocol.TTupleProtocol; //導入方法依賴的package包/類
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, CursorResponseMessage struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
struct.header.write(oprot);
oprot.writeI32(struct.cursorId);
BitSet optionals = new BitSet();
if (struct.isSetValues()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetValues()) {
{
oprot.writeI32(struct.values.size());
for (KeyedValues _iter60 : struct.values)
{
_iter60.write(oprot);
}
}
}
}
示例8: write
import org.apache.thrift.protocol.TTupleProtocol; //導入方法依賴的package包/類
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TResult struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
{
oprot.writeI32(struct.columnValues.size());
for (TColumnValue _iter4 : struct.columnValues)
{
_iter4.write(oprot);
}
}
BitSet optionals = new BitSet();
if (struct.isSetRow()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetRow()) {
oprot.writeBinary(struct.row);
}
}
示例9: write
import org.apache.thrift.protocol.TTupleProtocol; //導入方法依賴的package包/類
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, SyncOfferMessage struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
struct.header.write(oprot);
struct.store.write(oprot);
BitSet optionals = new BitSet();
if (struct.isSetVersions()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetVersions()) {
{
oprot.writeI32(struct.versions.size());
for (KeyedVersions _iter44 : struct.versions)
{
_iter44.write(oprot);
}
}
}
}
示例10: write
import org.apache.thrift.protocol.TTupleProtocol; //導入方法依賴的package包/類
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getPackets_result struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetSuccess()) {
{
oprot.writeI32(struct.success.size());
for (ByteBuffer _iter12 : struct.success)
{
oprot.writeBinary(_iter12);
}
}
}
}
示例11: write
import org.apache.thrift.protocol.TTupleProtocol; //導入方法依賴的package包/類
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, SyncValueMessage struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
struct.header.write(oprot);
struct.store.write(oprot);
BitSet optionals = new BitSet();
if (struct.isSetValues()) {
optionals.set(0);
}
if (struct.isSetResponseTo()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetValues()) {
{
oprot.writeI32(struct.values.size());
for (KeyedValues _iter36 : struct.values)
{
_iter36.write(oprot);
}
}
}
if (struct.isSetResponseTo()) {
oprot.writeI32(struct.responseTo);
}
}
示例12: write
import org.apache.thrift.protocol.TTupleProtocol; //導入方法依賴的package包/類
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, ErrorMessage struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
struct.header.write(oprot);
BitSet optionals = new BitSet();
if (struct.isSetError()) {
optionals.set(0);
}
if (struct.isSetType()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetError()) {
struct.error.write(oprot);
}
if (struct.isSetType()) {
oprot.writeI32(struct.type.getValue());
}
}
示例13: write
import org.apache.thrift.protocol.TTupleProtocol; //導入方法依賴的package包/類
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, Message struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetI()) {
optionals.set(0);
}
if (struct.isSetB()) {
optionals.set(1);
}
if (struct.isSetS()) {
optionals.set(2);
}
if (struct.isSetL()) {
optionals.set(3);
}
oprot.writeBitSet(optionals, 4);
if (struct.isSetI()) {
oprot.writeI32(struct.i);
}
if (struct.isSetB()) {
oprot.writeBool(struct.b);
}
if (struct.isSetS()) {
oprot.writeString(struct.s);
}
if (struct.isSetL()) {
{
oprot.writeI32(struct.l.size());
for (int _iter4 : struct.l)
{
oprot.writeI32(_iter4);
}
}
}
}