本文整理匯總了Java中org.apache.thrift.protocol.TTupleProtocol.readI16方法的典型用法代碼示例。如果您正苦於以下問題:Java TTupleProtocol.readI16方法的具體用法?Java TTupleProtocol.readI16怎麽用?Java TTupleProtocol.readI16使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.apache.thrift.protocol.TTupleProtocol
的用法示例。
在下文中一共展示了TTupleProtocol.readI16方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: read
import org.apache.thrift.protocol.TTupleProtocol; //導入方法依賴的package包/類
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, HelloMessage struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
struct.header = new AsyncMessageHeader();
struct.header.read(iprot);
struct.setHeaderIsSet(true);
BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
struct.nodeId = iprot.readI16();
struct.setNodeIdIsSet(true);
}
if (incoming.get(1)) {
struct.authScheme = AuthScheme.findByValue(iprot.readI32());
struct.setAuthSchemeIsSet(true);
}
if (incoming.get(2)) {
struct.authChallengeResponse = new AuthChallengeResponse();
struct.authChallengeResponse.read(iprot);
struct.setAuthChallengeResponseIsSet(true);
}
}
示例2: read
import org.apache.thrift.protocol.TTupleProtocol; //導入方法依賴的package包/類
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, Node struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(4);
if (incoming.get(0)) {
struct.nodeId = iprot.readI16();
struct.setNodeIdIsSet(true);
}
if (incoming.get(1)) {
struct.domainId = iprot.readI16();
struct.setDomainIdIsSet(true);
}
if (incoming.get(2)) {
struct.hostname = iprot.readString();
struct.setHostnameIsSet(true);
}
if (incoming.get(3)) {
struct.port = iprot.readI32();
struct.setPortIsSet(true);
}
}
示例3: read
import org.apache.thrift.protocol.TTupleProtocol; //導入方法依賴的package包/類
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, ClusterJoinResponseMessage struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
struct.header = new AsyncMessageHeader();
struct.header.read(iprot);
struct.setHeaderIsSet(true);
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.newNodeId = iprot.readI16();
struct.setNewNodeIdIsSet(true);
}
if (incoming.get(1)) {
{
org.apache.thrift.protocol.TList _list69 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
struct.nodeStore = new ArrayList<KeyedValues>(_list69.size);
for (int _i70 = 0; _i70 < _list69.size; ++_i70)
{
KeyedValues _elem71; // required
_elem71 = new KeyedValues();
_elem71.read(iprot);
struct.nodeStore.add(_elem71);
}
}
struct.setNodeStoreIsSet(true);
}
}
示例4: read
import org.apache.thrift.protocol.TTupleProtocol; //導入方法依賴的package包/類
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, ClockEntry struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
struct.nodeId = iprot.readI16();
struct.setNodeIdIsSet(true);
struct.version = iprot.readI64();
struct.setVersionIsSet(true);
}
示例5: read
import org.apache.thrift.protocol.TTupleProtocol; //導入方法依賴的package包/類
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, SwitchPortTuple struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.dpid = iprot.readI64();
struct.setDpidIsSet(true);
}
if (incoming.get(1)) {
struct.port = iprot.readI16();
struct.setPortIsSet(true);
}
}