public static TimedOutException toThrift(RequestTimeoutException e)
{
TimedOutException toe = new TimedOutException();
if (e instanceof WriteTimeoutException)
{
WriteTimeoutException wte = (WriteTimeoutException)e;
toe.setAcknowledged_by(wte.received);
if (wte.writeType == WriteType.BATCH_LOG)
toe.setAcknowledged_by_batchlog(false);
else if (wte.writeType == WriteType.BATCH)
toe.setAcknowledged_by_batchlog(true);