use of com.yahoo.vespa.config.server.session.SessionFactory in project vespa by vespa-engine.
the class ApplicationRepository method createSessionFromExisting.
public long createSessionFromExisting(Tenant tenant, DeployLogger logger, TimeoutBudget timeoutBudget, ApplicationId applicationId) {
LocalSessionRepo localSessionRepo = tenant.getLocalSessionRepo();
SessionFactory sessionFactory = tenant.getSessionFactory();
LocalSession fromSession = getExistingSession(tenant, applicationId);
LocalSession session = sessionFactory.createSessionFromExisting(fromSession, logger, timeoutBudget);
localSessionRepo.addSession(session);
return session.getSessionId();
}
use of com.yahoo.vespa.config.server.session.SessionFactory in project vespa by vespa-engine.
the class ApplicationRepository method createSession.
public long createSession(Tenant tenant, TimeoutBudget timeoutBudget, File applicationDirectory, String applicationName) {
LocalSessionRepo localSessionRepo = tenant.getLocalSessionRepo();
SessionFactory sessionFactory = tenant.getSessionFactory();
LocalSession session = sessionFactory.createSession(applicationDirectory, applicationName, timeoutBudget);
localSessionRepo.addSession(session);
return session.getSessionId();
}
use of com.yahoo.vespa.config.server.session.SessionFactory in project vespa by vespa-engine.
the class SessionActiveHandlerTest method createHandler.
private SessionHandler createHandler() throws Exception {
final SessionFactory sessionFactory = new MockSessionFactory();
TestTenantBuilder testTenantBuilder = new TestTenantBuilder();
testTenantBuilder.createTenant(tenant).withSessionFactory(sessionFactory).withLocalSessionRepo(localRepo).withRemoteSessionRepo(remoteSessionRepo).withApplicationRepo(applicationRepo).build();
return new SessionActiveHandler(SessionActiveHandler.testOnlyContext(), new ApplicationRepository(testTenantBuilder.createTenants(), hostProvisioner, Clock.systemUTC()), testTenantBuilder.createTenants(), Zone.defaultZone());
}
Aggregations