in tephra-core/src/main/java/org/apache/tephra/distributed/thrift/TTransaction.java [1023:1144]
public void read(org.apache.thrift.protocol.TProtocol iprot, TTransaction struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 1: // TRANSACTION_ID
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.transactionId = iprot.readI64();
struct.setTransactionIdIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // READ_POINTER
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.readPointer = iprot.readI64();
struct.setReadPointerIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // INVALIDS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list0 = iprot.readListBegin();
struct.invalids = new ArrayList<Long>(_list0.size);
for (int _i1 = 0; _i1 < _list0.size; ++_i1)
{
long _elem2; // required
_elem2 = iprot.readI64();
struct.invalids.add(_elem2);
}
iprot.readListEnd();
}
struct.setInvalidsIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 4: // IN_PROGRESS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list3 = iprot.readListBegin();
struct.inProgress = new ArrayList<Long>(_list3.size);
for (int _i4 = 0; _i4 < _list3.size; ++_i4)
{
long _elem5; // required
_elem5 = iprot.readI64();
struct.inProgress.add(_elem5);
}
iprot.readListEnd();
}
struct.setInProgressIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 5: // FIRST_SHORT
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.firstShort = iprot.readI64();
struct.setFirstShortIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 6: // TYPE
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.type = TTransactionType.findByValue(iprot.readI32());
struct.setTypeIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 7: // WRITE_POINTER
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.writePointer = iprot.readI64();
struct.setWritePointerIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 8: // CHECKPOINT_WRITE_POINTERS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list6 = iprot.readListBegin();
struct.checkpointWritePointers = new ArrayList<Long>(_list6.size);
for (int _i7 = 0; _i7 < _list6.size; ++_i7)
{
long _elem8; // required
_elem8 = iprot.readI64();
struct.checkpointWritePointers.add(_elem8);
}
iprot.readListEnd();
}
struct.setCheckpointWritePointersIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 9: // VISIBILITY_LEVEL
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.visibilityLevel = TVisibilityLevel.findByValue(iprot.readI32());
struct.setVisibilityLevelIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}