Search in sources :

Example 6 with ConfigSourceSet

use of com.yahoo.config.subscription.ConfigSourceSet in project vespa by vespa-engine.

the class ProxyServer method main.

public static void main(String[] args) {
    /* Initialize the log handler */
    LogSetup.clearHandlers();
    LogSetup.initVespaLogging("configproxy");
    Properties properties = getSystemProperties();
    int port = DEFAULT_RPC_PORT;
    if (args.length > 0) {
        port = Integer.parseInt(args[0]);
    }
    Event.started("configproxy");
    ConfigProxyStatistics statistics = new ConfigProxyStatistics(properties.eventInterval);
    Thread t = new Thread(statistics);
    t.setName("Metrics generator");
    t.setDaemon(true);
    t.start();
    ConfigSourceSet configSources = new ConfigSourceSet(properties.configSources);
    DelayedResponses delayedResponses = new DelayedResponses(statistics);
    ProxyServer proxyServer = new ProxyServer(new Spec(null, port), delayedResponses, configSources, statistics, defaultTimingValues(), true, new MemoryCache(), null);
    // catch termination signal
    proxyServer.setupSigTermHandler();
    Thread proxyserverThread = new Thread(proxyServer);
    proxyserverThread.setName("configproxy");
    proxyserverThread.start();
    proxyServer.waitForShutdown();
}
Also used : ConfigSourceSet(com.yahoo.config.subscription.ConfigSourceSet) Spec(com.yahoo.jrt.Spec)

Example 7 with ConfigSourceSet

use of com.yahoo.config.subscription.ConfigSourceSet in project vespa by vespa-engine.

the class ProxyServer method updateSourceConnections.

void updateSourceConnections(List<String> sources) {
    configSource = new ConfigSourceSet(sources);
    flush();
    configClient = createRpcClient();
}
Also used : ConfigSourceSet(com.yahoo.config.subscription.ConfigSourceSet)

Aggregations

ConfigSourceSet (com.yahoo.config.subscription.ConfigSourceSet)7 Test (org.junit.Test)3 Supervisor (com.yahoo.jrt.Supervisor)2 Transport (com.yahoo.jrt.Transport)2 ConfigSubscriber (com.yahoo.config.subscription.ConfigSubscriber)1 GenericConfigSubscriber (com.yahoo.config.subscription.impl.GenericConfigSubscriber)1 JRTConfigSubscription (com.yahoo.config.subscription.impl.JRTConfigSubscription)1 MockConnection (com.yahoo.config.subscription.impl.MockConnection)1 SimpletypesConfig (com.yahoo.foo.SimpletypesConfig)1 Spec (com.yahoo.jrt.Spec)1 IMirror (com.yahoo.jrt.slobrok.api.IMirror)1 Mirror (com.yahoo.jrt.slobrok.api.Mirror)1 TimingValues (com.yahoo.vespa.config.TimingValues)1 Before (org.junit.Before)1