Package net.floodlightcontroller.threadpool

Examples of net.floodlightcontroller.threadpool.ThreadPool


                new ArrayList<IStoreClient<String,String>>();
        ArrayList<Short> nodeIds = new ArrayList<Short>();
        ArrayList<Node> nodes = new ArrayList<Node>();
       
        FloodlightModuleContext fmc = new FloodlightModuleContext();
        ThreadPool tp = new ThreadPool();

        int curPort = 6699;
       
        String keyStorePath = new File(dbFolder.getRoot(),
                                       "keystore.jceks").getAbsolutePath();
        String keyStorePassword = "bootstrapping is fun!";
        CryptoUtil.writeSharedSecret(keyStorePath,
                                     keyStorePassword,
                                     CryptoUtil.secureRandom(16));
       
        // autobootstrap a cluster of 4 nodes
        for (int i = 0; i < 4; i++) {
            SyncManager syncManager = new SyncManager();
            syncManagers.add(syncManager);

            fmc.addService(IThreadPoolService.class, tp);
            fmc.addService(IDebugCounterService.class, new NullDebugCounter());
            String dbPath =
                    new File(dbFolder.getRoot(),
                             "server" + i).getAbsolutePath();
            fmc.addConfigParam(syncManager, "dbPath", dbPath);

            tp.init(fmc);
            syncManager.init(fmc);
            tp.startUp(fmc);
            syncManager.startUp(fmc);
            syncManager.registerStore("localTestStore", Scope.LOCAL);
            syncManager.registerStore("globalTestStore", Scope.GLOBAL);
           
            IStoreClient<String, String> unsyncStore =
View Full Code Here


       
        nodes = new ArrayList<Node>();
        nodes.add(new Node("localhost", 40101, (short)1, (short)1));
        nodeString = mapper.writeValueAsString(nodes);
       
        tp = new ThreadPool();
        syncManager = new SyncManager();
       
        FloodlightModuleContext fmc = new FloodlightModuleContext();
        fmc.addService(IThreadPoolService.class, tp);
        fmc.addService(IDebugCounterService.class, new NullDebugCounter());
View Full Code Here

     * Set up the remote sync manager and prepare for requests
     * @throws Exception
     */
    protected void connect() throws Exception {
        FloodlightModuleContext fmc = new FloodlightModuleContext();
        ThreadPool tp = new ThreadPool();
        syncManager = new RemoteSyncManager();
        fmc.addService(IThreadPoolService.class, tp);
        fmc.addService(ISyncService.class, syncManager);
        fmc.addConfigParam(syncManager, "hostname", settings.hostname);
        fmc.addConfigParam(syncManager, "port",
                           Integer.toString(settings.port));
        if (settings.authScheme != null) {
            fmc.addConfigParam(syncManager, "authScheme",
                               settings.authScheme.toString());
            fmc.addConfigParam(syncManager, "keyStorePath", settings.keyStorePath);
            fmc.addConfigParam(syncManager, "keyStorePassword",
                               settings.keyStorePassword);
        }
        tp.init(fmc);
        syncManager.init(fmc);
        tp.startUp(fmc);
        syncManager.startUp(fmc);
       
        out.println("Using remote sync service at " +
                    settings.hostname + ":" + settings.port);
    }
View Full Code Here

    RemoteSyncManager remoteSyncManager;

    @Before
    public void setUp() throws Exception {
        FloodlightModuleContext fmc = new FloodlightModuleContext();
        tp = new ThreadPool();

        syncManager = new SyncManager();
        remoteSyncManager = new RemoteSyncManager();

        fmc.addService(IThreadPoolService.class, tp);
View Full Code Here

                "keystore.jceks");
        CryptoUtil.writeSharedSecret(keyStoreFile.getAbsolutePath(),
                                     keyStorePassword,
                                     CryptoUtil.secureRandom(16));

        tp = new ThreadPool();
       
        syncManagers = new SyncManager[4];
        moduleContexts = new FloodlightModuleContext[4];

        nodes = new ArrayList<Node>();
View Full Code Here

    @Test
    @Ignore
    public void testPerfOneNode() throws Exception {
        tearDown();
        tp = new ThreadPool();
        tp.init(null);
        tp.startUp(null);
        nodes = new ArrayList<Node>();
        nodes.add(new Node("localhost", 40101, (short)1, (short)1));
        nodeString = mapper.writeValueAsString(nodes);
View Full Code Here

TOP

Related Classes of net.floodlightcontroller.threadpool.ThreadPool

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.