Fix improper thrift field name
This commit is contained in:
parent
2abbc2984f
commit
9ab08c54a3
@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* Autogenerated by Thrift Compiler (0.19.0)
|
* Autogenerated by Thrift Compiler (0.20.0)
|
||||||
*
|
*
|
||||||
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
|
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
|
||||||
* @generated
|
* @generated
|
||||||
@ -13,7 +13,7 @@ public class RocksDB {
|
|||||||
|
|
||||||
public long openTransaction(long timeoutMs) throws org.apache.thrift.TException;
|
public long openTransaction(long timeoutMs) throws org.apache.thrift.TException;
|
||||||
|
|
||||||
public boolean closeTransaction(long timeoutMs, boolean commit) throws org.apache.thrift.TException;
|
public boolean closeTransaction(long transactionId, boolean commit) throws org.apache.thrift.TException;
|
||||||
|
|
||||||
public void closeFailedUpdate(long updateId) throws org.apache.thrift.TException;
|
public void closeFailedUpdate(long updateId) throws org.apache.thrift.TException;
|
||||||
|
|
||||||
@ -61,7 +61,7 @@ public class RocksDB {
|
|||||||
|
|
||||||
public void openTransaction(long timeoutMs, org.apache.thrift.async.AsyncMethodCallback<java.lang.Long> resultHandler) throws org.apache.thrift.TException;
|
public void openTransaction(long timeoutMs, org.apache.thrift.async.AsyncMethodCallback<java.lang.Long> resultHandler) throws org.apache.thrift.TException;
|
||||||
|
|
||||||
public void closeTransaction(long timeoutMs, boolean commit, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;
|
public void closeTransaction(long transactionId, boolean commit, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;
|
||||||
|
|
||||||
public void closeFailedUpdate(long updateId, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
|
public void closeFailedUpdate(long updateId, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
|
||||||
|
|
||||||
@ -152,16 +152,16 @@ public class RocksDB {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean closeTransaction(long timeoutMs, boolean commit) throws org.apache.thrift.TException
|
public boolean closeTransaction(long transactionId, boolean commit) throws org.apache.thrift.TException
|
||||||
{
|
{
|
||||||
send_closeTransaction(timeoutMs, commit);
|
send_closeTransaction(transactionId, commit);
|
||||||
return recv_closeTransaction();
|
return recv_closeTransaction();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void send_closeTransaction(long timeoutMs, boolean commit) throws org.apache.thrift.TException
|
public void send_closeTransaction(long transactionId, boolean commit) throws org.apache.thrift.TException
|
||||||
{
|
{
|
||||||
closeTransaction_args args = new closeTransaction_args();
|
closeTransaction_args args = new closeTransaction_args();
|
||||||
args.setTimeoutMs(timeoutMs);
|
args.setTransactionId(transactionId);
|
||||||
args.setCommit(commit);
|
args.setCommit(commit);
|
||||||
sendBase("closeTransaction", args);
|
sendBase("closeTransaction", args);
|
||||||
}
|
}
|
||||||
@ -719,19 +719,19 @@ public class RocksDB {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void closeTransaction(long timeoutMs, boolean commit, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException {
|
public void closeTransaction(long transactionId, boolean commit, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException {
|
||||||
checkReady();
|
checkReady();
|
||||||
closeTransaction_call method_call = new closeTransaction_call(timeoutMs, commit, resultHandler, this, ___protocolFactory, ___transport);
|
closeTransaction_call method_call = new closeTransaction_call(transactionId, commit, resultHandler, this, ___protocolFactory, ___transport);
|
||||||
this.___currentMethod = method_call;
|
this.___currentMethod = method_call;
|
||||||
___manager.call(method_call);
|
___manager.call(method_call);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class closeTransaction_call extends org.apache.thrift.async.TAsyncMethodCall<java.lang.Boolean> {
|
public static class closeTransaction_call extends org.apache.thrift.async.TAsyncMethodCall<java.lang.Boolean> {
|
||||||
private long timeoutMs;
|
private long transactionId;
|
||||||
private boolean commit;
|
private boolean commit;
|
||||||
public closeTransaction_call(long timeoutMs, boolean commit, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
|
public closeTransaction_call(long transactionId, boolean commit, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
|
||||||
super(client, protocolFactory, transport, resultHandler, false);
|
super(client, protocolFactory, transport, resultHandler, false);
|
||||||
this.timeoutMs = timeoutMs;
|
this.transactionId = transactionId;
|
||||||
this.commit = commit;
|
this.commit = commit;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -739,7 +739,7 @@ public class RocksDB {
|
|||||||
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
|
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
|
||||||
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("closeTransaction", org.apache.thrift.protocol.TMessageType.CALL, 0));
|
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("closeTransaction", org.apache.thrift.protocol.TMessageType.CALL, 0));
|
||||||
closeTransaction_args args = new closeTransaction_args();
|
closeTransaction_args args = new closeTransaction_args();
|
||||||
args.setTimeoutMs(timeoutMs);
|
args.setTransactionId(transactionId);
|
||||||
args.setCommit(commit);
|
args.setCommit(commit);
|
||||||
args.write(prot);
|
args.write(prot);
|
||||||
prot.writeMessageEnd();
|
prot.writeMessageEnd();
|
||||||
@ -1673,7 +1673,7 @@ public class RocksDB {
|
|||||||
@Override
|
@Override
|
||||||
public closeTransaction_result getResult(I iface, closeTransaction_args args) throws org.apache.thrift.TException {
|
public closeTransaction_result getResult(I iface, closeTransaction_args args) throws org.apache.thrift.TException {
|
||||||
closeTransaction_result result = new closeTransaction_result();
|
closeTransaction_result result = new closeTransaction_result();
|
||||||
result.success = iface.closeTransaction(args.timeoutMs, args.commit);
|
result.success = iface.closeTransaction(args.transactionId, args.commit);
|
||||||
result.setSuccessIsSet(true);
|
result.setSuccessIsSet(true);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -2415,7 +2415,7 @@ public class RocksDB {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void start(I iface, closeTransaction_args args, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException {
|
public void start(I iface, closeTransaction_args args, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException {
|
||||||
iface.closeTransaction(args.timeoutMs, args.commit,resultHandler);
|
iface.closeTransaction(args.transactionId, args.commit,resultHandler);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4481,18 +4481,18 @@ public class RocksDB {
|
|||||||
public static class closeTransaction_args implements org.apache.thrift.TBase<closeTransaction_args, closeTransaction_args._Fields>, java.io.Serializable, Cloneable, Comparable<closeTransaction_args> {
|
public static class closeTransaction_args implements org.apache.thrift.TBase<closeTransaction_args, closeTransaction_args._Fields>, java.io.Serializable, Cloneable, Comparable<closeTransaction_args> {
|
||||||
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("closeTransaction_args");
|
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("closeTransaction_args");
|
||||||
|
|
||||||
private static final org.apache.thrift.protocol.TField TIMEOUT_MS_FIELD_DESC = new org.apache.thrift.protocol.TField("timeoutMs", org.apache.thrift.protocol.TType.I64, (short)1);
|
private static final org.apache.thrift.protocol.TField TRANSACTION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("transactionId", org.apache.thrift.protocol.TType.I64, (short)1);
|
||||||
private static final org.apache.thrift.protocol.TField COMMIT_FIELD_DESC = new org.apache.thrift.protocol.TField("commit", org.apache.thrift.protocol.TType.BOOL, (short)2);
|
private static final org.apache.thrift.protocol.TField COMMIT_FIELD_DESC = new org.apache.thrift.protocol.TField("commit", org.apache.thrift.protocol.TType.BOOL, (short)2);
|
||||||
|
|
||||||
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new closeTransaction_argsStandardSchemeFactory();
|
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new closeTransaction_argsStandardSchemeFactory();
|
||||||
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new closeTransaction_argsTupleSchemeFactory();
|
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new closeTransaction_argsTupleSchemeFactory();
|
||||||
|
|
||||||
public long timeoutMs; // required
|
public long transactionId; // required
|
||||||
public boolean commit; // required
|
public boolean commit; // required
|
||||||
|
|
||||||
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
|
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
|
||||||
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
|
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
|
||||||
TIMEOUT_MS((short)1, "timeoutMs"),
|
TRANSACTION_ID((short)1, "transactionId"),
|
||||||
COMMIT((short)2, "commit");
|
COMMIT((short)2, "commit");
|
||||||
|
|
||||||
private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
|
private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
|
||||||
@ -4509,8 +4509,8 @@ public class RocksDB {
|
|||||||
@org.apache.thrift.annotation.Nullable
|
@org.apache.thrift.annotation.Nullable
|
||||||
public static _Fields findByThriftId(int fieldId) {
|
public static _Fields findByThriftId(int fieldId) {
|
||||||
switch(fieldId) {
|
switch(fieldId) {
|
||||||
case 1: // TIMEOUT_MS
|
case 1: // TRANSACTION_ID
|
||||||
return TIMEOUT_MS;
|
return TRANSACTION_ID;
|
||||||
case 2: // COMMIT
|
case 2: // COMMIT
|
||||||
return COMMIT;
|
return COMMIT;
|
||||||
default:
|
default:
|
||||||
@ -4556,13 +4556,13 @@ public class RocksDB {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// isset id assignments
|
// isset id assignments
|
||||||
private static final int __TIMEOUTMS_ISSET_ID = 0;
|
private static final int __TRANSACTIONID_ISSET_ID = 0;
|
||||||
private static final int __COMMIT_ISSET_ID = 1;
|
private static final int __COMMIT_ISSET_ID = 1;
|
||||||
private byte __isset_bitfield = 0;
|
private byte __isset_bitfield = 0;
|
||||||
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
|
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
|
||||||
static {
|
static {
|
||||||
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
|
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
|
||||||
tmpMap.put(_Fields.TIMEOUT_MS, new org.apache.thrift.meta_data.FieldMetaData("timeoutMs", org.apache.thrift.TFieldRequirementType.REQUIRED,
|
tmpMap.put(_Fields.TRANSACTION_ID, new org.apache.thrift.meta_data.FieldMetaData("transactionId", org.apache.thrift.TFieldRequirementType.REQUIRED,
|
||||||
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
|
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
|
||||||
tmpMap.put(_Fields.COMMIT, new org.apache.thrift.meta_data.FieldMetaData("commit", org.apache.thrift.TFieldRequirementType.REQUIRED,
|
tmpMap.put(_Fields.COMMIT, new org.apache.thrift.meta_data.FieldMetaData("commit", org.apache.thrift.TFieldRequirementType.REQUIRED,
|
||||||
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
|
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
|
||||||
@ -4574,12 +4574,12 @@ public class RocksDB {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public closeTransaction_args(
|
public closeTransaction_args(
|
||||||
long timeoutMs,
|
long transactionId,
|
||||||
boolean commit)
|
boolean commit)
|
||||||
{
|
{
|
||||||
this();
|
this();
|
||||||
this.timeoutMs = timeoutMs;
|
this.transactionId = transactionId;
|
||||||
setTimeoutMsIsSet(true);
|
setTransactionIdIsSet(true);
|
||||||
this.commit = commit;
|
this.commit = commit;
|
||||||
setCommitIsSet(true);
|
setCommitIsSet(true);
|
||||||
}
|
}
|
||||||
@ -4589,7 +4589,7 @@ public class RocksDB {
|
|||||||
*/
|
*/
|
||||||
public closeTransaction_args(closeTransaction_args other) {
|
public closeTransaction_args(closeTransaction_args other) {
|
||||||
__isset_bitfield = other.__isset_bitfield;
|
__isset_bitfield = other.__isset_bitfield;
|
||||||
this.timeoutMs = other.timeoutMs;
|
this.transactionId = other.transactionId;
|
||||||
this.commit = other.commit;
|
this.commit = other.commit;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4600,33 +4600,33 @@ public class RocksDB {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void clear() {
|
public void clear() {
|
||||||
setTimeoutMsIsSet(false);
|
setTransactionIdIsSet(false);
|
||||||
this.timeoutMs = 0;
|
this.transactionId = 0;
|
||||||
setCommitIsSet(false);
|
setCommitIsSet(false);
|
||||||
this.commit = false;
|
this.commit = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getTimeoutMs() {
|
public long getTransactionId() {
|
||||||
return this.timeoutMs;
|
return this.transactionId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public closeTransaction_args setTimeoutMs(long timeoutMs) {
|
public closeTransaction_args setTransactionId(long transactionId) {
|
||||||
this.timeoutMs = timeoutMs;
|
this.transactionId = transactionId;
|
||||||
setTimeoutMsIsSet(true);
|
setTransactionIdIsSet(true);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void unsetTimeoutMs() {
|
public void unsetTransactionId() {
|
||||||
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TIMEOUTMS_ISSET_ID);
|
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TRANSACTIONID_ISSET_ID);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Returns true if field timeoutMs is set (has been assigned a value) and false otherwise */
|
/** Returns true if field transactionId is set (has been assigned a value) and false otherwise */
|
||||||
public boolean isSetTimeoutMs() {
|
public boolean isSetTransactionId() {
|
||||||
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TIMEOUTMS_ISSET_ID);
|
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TRANSACTIONID_ISSET_ID);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setTimeoutMsIsSet(boolean value) {
|
public void setTransactionIdIsSet(boolean value) {
|
||||||
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TIMEOUTMS_ISSET_ID, value);
|
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TRANSACTIONID_ISSET_ID, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isCommit() {
|
public boolean isCommit() {
|
||||||
@ -4655,11 +4655,11 @@ public class RocksDB {
|
|||||||
@Override
|
@Override
|
||||||
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
|
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
|
||||||
switch (field) {
|
switch (field) {
|
||||||
case TIMEOUT_MS:
|
case TRANSACTION_ID:
|
||||||
if (value == null) {
|
if (value == null) {
|
||||||
unsetTimeoutMs();
|
unsetTransactionId();
|
||||||
} else {
|
} else {
|
||||||
setTimeoutMs((java.lang.Long)value);
|
setTransactionId((java.lang.Long)value);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -4678,8 +4678,8 @@ public class RocksDB {
|
|||||||
@Override
|
@Override
|
||||||
public java.lang.Object getFieldValue(_Fields field) {
|
public java.lang.Object getFieldValue(_Fields field) {
|
||||||
switch (field) {
|
switch (field) {
|
||||||
case TIMEOUT_MS:
|
case TRANSACTION_ID:
|
||||||
return getTimeoutMs();
|
return getTransactionId();
|
||||||
|
|
||||||
case COMMIT:
|
case COMMIT:
|
||||||
return isCommit();
|
return isCommit();
|
||||||
@ -4696,8 +4696,8 @@ public class RocksDB {
|
|||||||
}
|
}
|
||||||
|
|
||||||
switch (field) {
|
switch (field) {
|
||||||
case TIMEOUT_MS:
|
case TRANSACTION_ID:
|
||||||
return isSetTimeoutMs();
|
return isSetTransactionId();
|
||||||
case COMMIT:
|
case COMMIT:
|
||||||
return isSetCommit();
|
return isSetCommit();
|
||||||
}
|
}
|
||||||
@ -4717,12 +4717,12 @@ public class RocksDB {
|
|||||||
if (this == that)
|
if (this == that)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
boolean this_present_timeoutMs = true;
|
boolean this_present_transactionId = true;
|
||||||
boolean that_present_timeoutMs = true;
|
boolean that_present_transactionId = true;
|
||||||
if (this_present_timeoutMs || that_present_timeoutMs) {
|
if (this_present_transactionId || that_present_transactionId) {
|
||||||
if (!(this_present_timeoutMs && that_present_timeoutMs))
|
if (!(this_present_transactionId && that_present_transactionId))
|
||||||
return false;
|
return false;
|
||||||
if (this.timeoutMs != that.timeoutMs)
|
if (this.transactionId != that.transactionId)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4742,7 +4742,7 @@ public class RocksDB {
|
|||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
int hashCode = 1;
|
int hashCode = 1;
|
||||||
|
|
||||||
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(timeoutMs);
|
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(transactionId);
|
||||||
|
|
||||||
hashCode = hashCode * 8191 + ((commit) ? 131071 : 524287);
|
hashCode = hashCode * 8191 + ((commit) ? 131071 : 524287);
|
||||||
|
|
||||||
@ -4757,12 +4757,12 @@ public class RocksDB {
|
|||||||
|
|
||||||
int lastComparison = 0;
|
int lastComparison = 0;
|
||||||
|
|
||||||
lastComparison = java.lang.Boolean.compare(isSetTimeoutMs(), other.isSetTimeoutMs());
|
lastComparison = java.lang.Boolean.compare(isSetTransactionId(), other.isSetTransactionId());
|
||||||
if (lastComparison != 0) {
|
if (lastComparison != 0) {
|
||||||
return lastComparison;
|
return lastComparison;
|
||||||
}
|
}
|
||||||
if (isSetTimeoutMs()) {
|
if (isSetTransactionId()) {
|
||||||
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timeoutMs, other.timeoutMs);
|
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.transactionId, other.transactionId);
|
||||||
if (lastComparison != 0) {
|
if (lastComparison != 0) {
|
||||||
return lastComparison;
|
return lastComparison;
|
||||||
}
|
}
|
||||||
@ -4801,8 +4801,8 @@ public class RocksDB {
|
|||||||
java.lang.StringBuilder sb = new java.lang.StringBuilder("closeTransaction_args(");
|
java.lang.StringBuilder sb = new java.lang.StringBuilder("closeTransaction_args(");
|
||||||
boolean first = true;
|
boolean first = true;
|
||||||
|
|
||||||
sb.append("timeoutMs:");
|
sb.append("transactionId:");
|
||||||
sb.append(this.timeoutMs);
|
sb.append(this.transactionId);
|
||||||
first = false;
|
first = false;
|
||||||
if (!first) sb.append(", ");
|
if (!first) sb.append(", ");
|
||||||
sb.append("commit:");
|
sb.append("commit:");
|
||||||
@ -4814,7 +4814,7 @@ public class RocksDB {
|
|||||||
|
|
||||||
public void validate() throws org.apache.thrift.TException {
|
public void validate() throws org.apache.thrift.TException {
|
||||||
// check for required fields
|
// check for required fields
|
||||||
// alas, we cannot check 'timeoutMs' because it's a primitive and you chose the non-beans generator.
|
// alas, we cannot check 'transactionId' because it's a primitive and you chose the non-beans generator.
|
||||||
// alas, we cannot check 'commit' because it's a primitive and you chose the non-beans generator.
|
// alas, we cannot check 'commit' because it's a primitive and you chose the non-beans generator.
|
||||||
// check for sub-struct validity
|
// check for sub-struct validity
|
||||||
}
|
}
|
||||||
@ -4857,10 +4857,10 @@ public class RocksDB {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
switch (schemeField.id) {
|
switch (schemeField.id) {
|
||||||
case 1: // TIMEOUT_MS
|
case 1: // TRANSACTION_ID
|
||||||
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
|
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
|
||||||
struct.timeoutMs = iprot.readI64();
|
struct.transactionId = iprot.readI64();
|
||||||
struct.setTimeoutMsIsSet(true);
|
struct.setTransactionIdIsSet(true);
|
||||||
} else {
|
} else {
|
||||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||||
}
|
}
|
||||||
@ -4881,8 +4881,8 @@ public class RocksDB {
|
|||||||
iprot.readStructEnd();
|
iprot.readStructEnd();
|
||||||
|
|
||||||
// check for required fields of primitive type, which can't be checked in the validate method
|
// check for required fields of primitive type, which can't be checked in the validate method
|
||||||
if (!struct.isSetTimeoutMs()) {
|
if (!struct.isSetTransactionId()) {
|
||||||
throw new org.apache.thrift.protocol.TProtocolException("Required field 'timeoutMs' was not found in serialized data! Struct: " + toString());
|
throw new org.apache.thrift.protocol.TProtocolException("Required field 'transactionId' was not found in serialized data! Struct: " + toString());
|
||||||
}
|
}
|
||||||
if (!struct.isSetCommit()) {
|
if (!struct.isSetCommit()) {
|
||||||
throw new org.apache.thrift.protocol.TProtocolException("Required field 'commit' was not found in serialized data! Struct: " + toString());
|
throw new org.apache.thrift.protocol.TProtocolException("Required field 'commit' was not found in serialized data! Struct: " + toString());
|
||||||
@ -4895,8 +4895,8 @@ public class RocksDB {
|
|||||||
struct.validate();
|
struct.validate();
|
||||||
|
|
||||||
oprot.writeStructBegin(STRUCT_DESC);
|
oprot.writeStructBegin(STRUCT_DESC);
|
||||||
oprot.writeFieldBegin(TIMEOUT_MS_FIELD_DESC);
|
oprot.writeFieldBegin(TRANSACTION_ID_FIELD_DESC);
|
||||||
oprot.writeI64(struct.timeoutMs);
|
oprot.writeI64(struct.transactionId);
|
||||||
oprot.writeFieldEnd();
|
oprot.writeFieldEnd();
|
||||||
oprot.writeFieldBegin(COMMIT_FIELD_DESC);
|
oprot.writeFieldBegin(COMMIT_FIELD_DESC);
|
||||||
oprot.writeBool(struct.commit);
|
oprot.writeBool(struct.commit);
|
||||||
@ -4919,15 +4919,15 @@ public class RocksDB {
|
|||||||
@Override
|
@Override
|
||||||
public void write(org.apache.thrift.protocol.TProtocol prot, closeTransaction_args struct) throws org.apache.thrift.TException {
|
public void write(org.apache.thrift.protocol.TProtocol prot, closeTransaction_args struct) throws org.apache.thrift.TException {
|
||||||
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
|
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
|
||||||
oprot.writeI64(struct.timeoutMs);
|
oprot.writeI64(struct.transactionId);
|
||||||
oprot.writeBool(struct.commit);
|
oprot.writeBool(struct.commit);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void read(org.apache.thrift.protocol.TProtocol prot, closeTransaction_args struct) throws org.apache.thrift.TException {
|
public void read(org.apache.thrift.protocol.TProtocol prot, closeTransaction_args struct) throws org.apache.thrift.TException {
|
||||||
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
|
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
|
||||||
struct.timeoutMs = iprot.readI64();
|
struct.transactionId = iprot.readI64();
|
||||||
struct.setTimeoutMsIsSet(true);
|
struct.setTransactionIdIsSet(true);
|
||||||
struct.commit = iprot.readBool();
|
struct.commit = iprot.readBool();
|
||||||
struct.setCommitIsSet(true);
|
struct.setCommitIsSet(true);
|
||||||
}
|
}
|
||||||
|
@ -22,6 +22,7 @@ import java.net.InetSocketAddress;
|
|||||||
import java.nio.ByteBuffer;
|
import java.nio.ByteBuffer;
|
||||||
import java.nio.ByteOrder;
|
import java.nio.ByteOrder;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import org.apache.thrift.TException;
|
||||||
import org.apache.thrift.server.TThreadedSelectorServer;
|
import org.apache.thrift.server.TThreadedSelectorServer;
|
||||||
import org.apache.thrift.transport.TNonblockingServerSocket;
|
import org.apache.thrift.transport.TNonblockingServerSocket;
|
||||||
import org.apache.thrift.transport.TTransportException;
|
import org.apache.thrift.transport.TTransportException;
|
||||||
@ -131,8 +132,8 @@ public class ThriftServer extends Server {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean closeTransaction(long timeoutMs, boolean commit) {
|
public boolean closeTransaction(long transactionId, boolean commit) throws TException {
|
||||||
return client.getSyncApi().closeTransaction(timeoutMs, commit);
|
return client.getSyncApi().closeTransaction(transactionId, commit);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -42,7 +42,7 @@ service RocksDB {
|
|||||||
|
|
||||||
i64 openTransaction(1: required i64 timeoutMs),
|
i64 openTransaction(1: required i64 timeoutMs),
|
||||||
|
|
||||||
bool closeTransaction(1: required i64 timeoutMs, 2: required bool commit),
|
bool closeTransaction(1: required i64 transactionId, 2: required bool commit),
|
||||||
|
|
||||||
void closeFailedUpdate(1: required i64 updateId),
|
void closeFailedUpdate(1: required i64 updateId),
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user