@Override public ReindexStatus getReindexStatus() { if (reindexAsync.getProcessHandle().isDone()) { throw new ZanataServiceException("Reindexing not in currently in progress", 404); } ReindexStatus status = new ReindexStatus(); status.setCurrentElementType(reindexAsync.getCurrentClassName()); status.setIndexedElements(reindexAsync.getProcessHandle().getCurrentProgress()); status.setTotalElements(reindexAsync.getProcessHandle().getMaxProgress()); // TODO This service is currently not being used // To re-add these properties, just implement TimedAsyncHandle // status.setTimeElapsed(reindexAsync.getProcessHandle().getElapsedTime()); // status.setTimeRemaining(reindexAsync.getProcessHandle().getEstimatedTimeRemaining()); return status; }