本文整理匯總了Java中org.apache.thrift.protocol.TTupleProtocol.writeBinary方法的典型用法代碼示例。如果您正苦於以下問題:Java TTupleProtocol.writeBinary方法的具體用法?Java TTupleProtocol.writeBinary怎麽用?Java TTupleProtocol.writeBinary使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.apache.thrift.protocol.TTupleProtocol
的用法示例。
在下文中一共展示了TTupleProtocol.writeBinary方法的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: write
import org.apache.thrift.protocol.TTupleProtocol; //導入方法依賴的package包/類
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, checkAndDelete_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
oprot.writeBinary(struct.table);
oprot.writeBinary(struct.row);
oprot.writeBinary(struct.family);
oprot.writeBinary(struct.qualifier);
struct.tdelete.write(oprot);
BitSet optionals = new BitSet();
if (struct.isSetValue()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetValue()) {
oprot.writeBinary(struct.value);
}
}
示例2: write
import org.apache.thrift.protocol.TTupleProtocol; //導入方法依賴的package包/類
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, KeyedVersions struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
oprot.writeBinary(struct.key);
{
oprot.writeI32(struct.versions.size());
for (VectorClock _iter20 : struct.versions)
{
_iter20.write(oprot);
}
}
}
示例3: write
import org.apache.thrift.protocol.TTupleProtocol; //導入方法依賴的package包/類
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getRowTs_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetTableName()) {
optionals.set(0);
}
if (struct.isSetRow()) {
optionals.set(1);
}
if (struct.isSetTimestamp()) {
optionals.set(2);
}
if (struct.isSetAttributes()) {
optionals.set(3);
}
oprot.writeBitSet(optionals, 4);
if (struct.isSetTableName()) {
oprot.writeBinary(struct.tableName);
}
if (struct.isSetRow()) {
oprot.writeBinary(struct.row);
}
if (struct.isSetTimestamp()) {
oprot.writeI64(struct.timestamp);
}
if (struct.isSetAttributes()) {
{
oprot.writeI32(struct.attributes.size());
for (Map.Entry<ByteBuffer, ByteBuffer> _iter187 : struct.attributes.entrySet())
{
oprot.writeBinary(_iter187.getKey());
oprot.writeBinary(_iter187.getValue());
}
}
}
}
示例4: write
import org.apache.thrift.protocol.TTupleProtocol; //導入方法依賴的package包/類
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TRowResult struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetRow()) {
optionals.set(0);
}
if (struct.isSetColumns()) {
optionals.set(1);
}
if (struct.isSetSortedColumns()) {
optionals.set(2);
}
oprot.writeBitSet(optionals, 3);
if (struct.isSetRow()) {
oprot.writeBinary(struct.row);
}
if (struct.isSetColumns()) {
{
oprot.writeI32(struct.columns.size());
for (Map.Entry<ByteBuffer, TCell> _iter17 : struct.columns.entrySet())
{
oprot.writeBinary(_iter17.getKey());
_iter17.getValue().write(oprot);
}
}
}
if (struct.isSetSortedColumns()) {
{
oprot.writeI32(struct.sortedColumns.size());
for (TColumn _iter18 : struct.sortedColumns)
{
_iter18.write(oprot);
}
}
}
}
示例5: write
import org.apache.thrift.protocol.TTupleProtocol; //導入方法依賴的package包/類
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, DeleteRequestMessage struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
struct.header.write(oprot);
oprot.writeString(struct.storeName);
oprot.writeBinary(struct.key);
BitSet optionals = new BitSet();
if (struct.isSetVersion()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetVersion()) {
struct.version.write(oprot);
}
}
示例6: write
import org.apache.thrift.protocol.TTupleProtocol; //導入方法依賴的package包/類
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, Mutation struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetIsDelete()) {
optionals.set(0);
}
if (struct.isSetColumn()) {
optionals.set(1);
}
if (struct.isSetValue()) {
optionals.set(2);
}
if (struct.isSetWriteToWAL()) {
optionals.set(3);
}
oprot.writeBitSet(optionals, 4);
if (struct.isSetIsDelete()) {
oprot.writeBool(struct.isDelete);
}
if (struct.isSetColumn()) {
oprot.writeBinary(struct.column);
}
if (struct.isSetValue()) {
oprot.writeBinary(struct.value);
}
if (struct.isSetWriteToWAL()) {
oprot.writeBool(struct.writeToWAL);
}
}
示例7: write
import org.apache.thrift.protocol.TTupleProtocol; //導入方法依賴的package包/類
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TRowMutations struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
oprot.writeBinary(struct.row);
{
oprot.writeI32(struct.mutations.size());
for (TMutation _iter128 : struct.mutations)
{
_iter128.write(oprot);
}
}
}
示例8: write
import org.apache.thrift.protocol.TTupleProtocol; //導入方法依賴的package包/類
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, GetRequestMessage struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
struct.header.write(oprot);
oprot.writeString(struct.storeName);
oprot.writeBinary(struct.key);
}