Package org.rhq.core.pluginapi.operation

Examples of org.rhq.core.pluginapi.operation.OperationServicesResult


            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
            // to 30 seconds by default but we are overriding it to be 100 ms.
            Thread.sleep(3000);

            assertEquals(result.getResultCode(), OperationServicesResultCode.SUCCESS, "The operation failed: " +
                result.getErrorStackTrace());

            assertNodeIsUp("Expected " + newStorageNode + " to be up after the prepareForBootstrap operation completes.");

            assertThatInternodeAuthConfFileMatches("127.0.0.1", "127.0.0.2");

View Full Code Here

TOP

Related Classes of org.rhq.core.pluginapi.operation.OperationServicesResult

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.