@Override public boolean truncateInvalidTxBefore(long time) throws InvalidTruncateTimeException { return delegate.truncateInvalidTxBefore(time); }
@Override public boolean truncateInvalidTxBefore(long time) throws InvalidTruncateTimeException { return delegate.truncateInvalidTxBefore(time); }
@Override public boolean truncateInvalidTxBefore(long time) throws InvalidTruncateTimeException { return delegate.truncateInvalidTxBefore(time); }
@Override public boolean truncateInvalidTxBefore(long time) throws InvalidTruncateTimeException { return delegate.truncateInvalidTxBefore(time); }
@Override public boolean truncateInvalidTxBefore(long time) throws InvalidTruncateTimeException { return delegate.truncateInvalidTxBefore(time); }
@Override public boolean truncateInvalidTxBefore(long time) throws InvalidTruncateTimeException { return delegate.truncateInvalidTxBefore(time); }
@Override public boolean truncateInvalidTxBefore(long time) throws InvalidTruncateTimeException { try { return delegate.truncateInvalidTxBefore(time); } catch (RuntimeException e) { throw handleException(e); } }
@Override public boolean truncateInvalidTxBefore(long time) throws InvalidTruncateTimeException { try { return delegate.truncateInvalidTxBefore(time); } catch (RuntimeException e) { throw handleException(e); } }
@Path("/transactions/invalid/remove/until") @POST @AuditPolicy(AuditDetail.REQUEST_BODY) public void truncateInvalidTxBefore(FullHttpRequest request, HttpResponder responder) throws InvalidTruncateTimeException { Map<String, Long> body; try { body = parseBody(request, STRING_LONG_MAP_TYPE); } catch (IllegalArgumentException e) { responder.sendString(HttpResponseStatus.BAD_REQUEST, "Invalid time value in request"); return; } if (body == null || !body.containsKey("time")) { responder.sendString(HttpResponseStatus.BAD_REQUEST, "Time not specified"); return; } long time = body.get("time"); txClient.truncateInvalidTxBefore(time); responder.sendStatus(HttpResponseStatus.OK); }
@Path("/transactions/invalid/remove/until") @POST @AuditPolicy(AuditDetail.REQUEST_BODY) public void truncateInvalidTxBefore(FullHttpRequest request, HttpResponder responder) throws InvalidTruncateTimeException { Map<String, Long> body; try { body = parseBody(request, STRING_LONG_MAP_TYPE); } catch (IllegalArgumentException e) { responder.sendString(HttpResponseStatus.BAD_REQUEST, "Invalid time value in request"); return; } if (body == null || !body.containsKey("time")) { responder.sendString(HttpResponseStatus.BAD_REQUEST, "Time not specified"); return; } long time = body.get("time"); txClient.truncateInvalidTxBefore(time); responder.sendStatus(HttpResponseStatus.OK); }
long time = Long.parseLong(args[1]); out.println("Invalid list size before truncation: " + txClient.getInvalidSize()); txClient.truncateInvalidTxBefore(time); out.println("Invalid list size after truncation: " + txClient.getInvalidSize()); } catch (InvalidTruncateTimeException e) {