Search in sources :

Example 1 with SessionFactory

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();
}
Also used : SessionFactory(com.yahoo.vespa.config.server.session.SessionFactory) LocalSessionRepo(com.yahoo.vespa.config.server.session.LocalSessionRepo) LocalSession(com.yahoo.vespa.config.server.session.LocalSession)

Example 2 with SessionFactory

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();
}
Also used : SessionFactory(com.yahoo.vespa.config.server.session.SessionFactory) LocalSessionRepo(com.yahoo.vespa.config.server.session.LocalSessionRepo) LocalSession(com.yahoo.vespa.config.server.session.LocalSession)

Example 3 with SessionFactory

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());
}
Also used : SessionFactory(com.yahoo.vespa.config.server.session.SessionFactory) ApplicationRepository(com.yahoo.vespa.config.server.ApplicationRepository)

Aggregations

SessionFactory (com.yahoo.vespa.config.server.session.SessionFactory)3 LocalSession (com.yahoo.vespa.config.server.session.LocalSession)2 LocalSessionRepo (com.yahoo.vespa.config.server.session.LocalSessionRepo)2 ApplicationRepository (com.yahoo.vespa.config.server.ApplicationRepository)1