Search in sources :

Example 1 with ReloadListener

use of com.yahoo.vespa.config.server.ReloadListener in project vespa by vespa-engine.

the class TenantRequestHandler method reloadListenersOnRemove.

private void reloadListenersOnRemove(ApplicationId applicationId) {
    for (ReloadListener listener : reloadListeners) {
        listener.applicationRemoved(applicationId);
        listener.hostsUpdated(tenant, hostRegistry.getAllHosts());
    }
}
Also used : ReloadListener(com.yahoo.vespa.config.server.ReloadListener)

Example 2 with ReloadListener

use of com.yahoo.vespa.config.server.ReloadListener in project vespa by vespa-engine.

the class TenantRequestHandler method notifyReloadListeners.

private void notifyReloadListeners(ApplicationSet applicationSet) {
    for (ReloadListener reloadListener : reloadListeners) {
        reloadListener.hostsUpdated(tenant, hostRegistry.getAllHosts());
        reloadListener.configActivated(tenant, applicationSet);
    }
}
Also used : ReloadListener(com.yahoo.vespa.config.server.ReloadListener)

Example 3 with ReloadListener

use of com.yahoo.vespa.config.server.ReloadListener in project vespa by vespa-engine.

the class TenantRequestHandlerTest method setUp.

@Before
public void setUp() throws IOException, SAXException {
    feedApp(app1, 1);
    Metrics sh = Metrics.createTestMetrics();
    List<ReloadListener> listeners = new ArrayList<>();
    listeners.add(listener);
    server = new TenantRequestHandler(sh, tenant, listeners, new UncompressedConfigResponseFactory(), new HostRegistries());
    componentRegistry = new TestComponentRegistry.Builder().curator(curator).modelFactoryRegistry(createRegistry()).build();
}
Also used : ReloadListener(com.yahoo.vespa.config.server.ReloadListener) Metrics(com.yahoo.vespa.config.server.monitoring.Metrics) HostRegistries(com.yahoo.vespa.config.server.host.HostRegistries) UncompressedConfigResponseFactory(com.yahoo.vespa.config.server.rpc.UncompressedConfigResponseFactory) Before(org.junit.Before)

Aggregations

ReloadListener (com.yahoo.vespa.config.server.ReloadListener)3 HostRegistries (com.yahoo.vespa.config.server.host.HostRegistries)1 Metrics (com.yahoo.vespa.config.server.monitoring.Metrics)1 UncompressedConfigResponseFactory (com.yahoo.vespa.config.server.rpc.UncompressedConfigResponseFactory)1 Before (org.junit.Before)1