Package org.rhq.core.pc.operation

Examples of org.rhq.core.pc.operation.OperationServicesAdapter


    }

    @Test(dependsOnMethods = "discoverStorageNode")
    public void shutdownStorageNode() throws Exception {
        OperationManager operationManager = PluginContainer.getInstance().getOperationManager();
        OperationServicesAdapter operationsService = new OperationServicesAdapter(operationManager);

        long timeout = 1000 * 60;
        OperationContextImpl operationContext = new OperationContextImpl(storageNode.getId(), operationManager);
        OperationServicesResult result = operationsService.invokeOperation(operationContext, "shutdown",
            new Configuration(), timeout);

        assertEquals(result.getResultCode(), OperationServicesResultCode.SUCCESS, "The shutdown operation failed");

        File binDir = new File(basedir, "bin");
View Full Code Here


    }

    @Test(dependsOnMethods = "shutdownStorageNode")
    public void restartStorageNode() {
        OperationManager operationManager = PluginContainer.getInstance().getOperationManager();
        OperationServicesAdapter operationsService = new OperationServicesAdapter(operationManager);

        long timeout = 1000 * 60;
        OperationContextImpl operationContext = new OperationContextImpl(storageNode.getId(), operationManager);
        OperationServicesResult result = operationsService.invokeOperation(operationContext, "start",
            new Configuration(), timeout);

        assertEquals(result.getResultCode(), OperationServicesResultCode.SUCCESS, "The start operation failed.");

        File binDir = new File(basedir, "bin");
View Full Code Here

        } catch (InterruptedException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
        OperationManager operationManager = PluginContainer.getInstance().getOperationManager();
        OperationServicesAdapter operationsService = new OperationServicesAdapter(operationManager);

        long timeout = 1000 * 60;
        OperationContextImpl operationContext = new OperationContextImpl(storageNode.getId(), operationManager);
        return operationsService.invokeOperation(operationContext, "takeSnapshot", params, timeout);
    }
View Full Code Here

            Configuration params = Configuration.builder().addSimple("cqlPort", 9142).addSimple("gossipPort", 7200)
                .openList("addresses", "address").addSimples("127.0.0.1", "127.0.0.2")
                .closeList().build();

            OperationManager operationManager = PluginContainer.getInstance().getOperationManager();
            OperationServicesAdapter operationsService = new OperationServicesAdapter(operationManager);

            long timeout = 1000 * 60;
            OperationContextImpl operationContext = new OperationContextImpl(newStorageNode.getId(), operationManager);
            OperationServicesResult result = operationsService.invokeOperation(operationContext, "prepareForBootstrap",
                params, timeout);

            log.info("Waiting for node to boostrap...");
            // When a node goes through bootstrap, StorageService sleeps for RING_DELAY ms
            // while it determines the ranges of the token ring it will own. RING_DELAY defaults
View Full Code Here

TOP

Related Classes of org.rhq.core.pc.operation.OperationServicesAdapter

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.