Package org.jboss.dna.graph

Examples of org.jboss.dna.graph.Results


            // Perform the refresh while retaining changes ...
            // Phase 1: determine which nodes can be unloaded, which must be refreshed, and which must be unchanged ...
            RefreshState<Payload, PropertyPayload> refreshState = new RefreshState<Payload, PropertyPayload>();
            node.refreshPhase1(refreshState);
            // If there are any nodes to be refreshed, read then in a single batch ...
            Results readResults = null;
            if (!refreshState.getNodesToBeRefreshed().isEmpty()) {
                Graph.Batch batch = store.batch();
                for (Node<Payload, PropertyPayload> nodeToBeRefreshed : refreshState.getNodesToBeRefreshed()) {
                    batch.read(nodeToBeRefreshed.getLocation());
                }
View Full Code Here


        @Override
        public void finish() {
            super.finish();
            if (!nodesToLoad.isEmpty()) {
                // Read all of the children in one batch ...
                Results results = batch.execute();
                // Now load all of the children into the correct node ...
                for (Node<Payload, PropertyPayload> childToBeRead : nodesToLoad) {
                    org.jboss.dna.graph.Node persistentNode = results.getNode(childToBeRead.getLocation());
                    nodeOperations.materialize(persistentNode, childToBeRead);
                    finishNodeAfterLoading(childToBeRead);
                }
            }
        }
View Full Code Here

    protected void assertReadUsingBatch( String... pathsInFederated ) {
        Graph.Batch batch = federated.batch();
        for (String pathInFederated : pathsInFederated) {
            batch.read(pathInFederated).and();
        }
        Results results = batch.execute();
        for (String pathInFederated : pathsInFederated) {
            assertThat(results.getNode(pathInFederated), is(notNullValue()));
        }
    }
View Full Code Here

TOP

Related Classes of org.jboss.dna.graph.Results

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.