use of com.yahoo.vespa.config.server.NotFoundException in project vespa by vespa-engine.
the class SessionRepo method internalGetSession.
private synchronized SESSIONTYPE internalGetSession(long id, long timeoutInMillis) throws InterruptedException {
TimeoutBudget timeoutBudget = new TimeoutBudget(Clock.systemUTC(), Duration.ofMillis(timeoutInMillis));
do {
SESSIONTYPE session = getSession(id);
if (session != null) {
return session;
}
wait(100);
} while (timeoutBudget.hasTimeLeft());
throw new NotFoundException("Unable to retrieve session with id " + id + " before timeout was reached");
}
Aggregations