Examples of GridNode


Examples of appeng.me.GridNode

  }

  @Override
  public boolean visitNode(IGridNode n)
  {
    GridNode gn = (GridNode) n;
    gn.setControllerRoute( null, true );
    gn.incrementChannelCount( usedChannels );
    gn.finalizeChannels();
    return true;
  }
View Full Code Here

Examples of gridool.GridNode

        for(Map.Entry<String, List<GridNode>> entry : mapping.entrySet()) {
            final String key = entry.getKey();
            final List<GridNode> candidateNodes = entry.getValue();
            assert (!candidateNodes.isEmpty());

            final GridNode node = selector.selectNode(candidateNodes, config);
            candidateNodes.clear(); // let GC do its work

            List<String> mappedKeys = nodeKeysMap.get(node);
            if(mappedKeys == null) {
                mappedKeys = new ArrayList<String>(128);
View Full Code Here

Examples of gridool.GridNode

    private static Grid connectToGrid(boolean delegate) {
        boolean delegated = false;
        GridClient grid = new GridClient();
        if(delegate) {
            try {
                final GridNode delegatedNode = grid.delegate(true);
                if(delegatedNode != null) {
                    delegated = true;
                    grid = new GridClient(delegatedNode);
                }
            } catch (RemoteException e) {
View Full Code Here

Examples of gridool.GridNode

                final List<GridNode> replicatedNodes = collector.getMatched();
                if(replicatedNodes == null || replicatedNodes.isEmpty()) {
                    throw new GridException("No replicated document found for path: " + path);
                }
                // TODO Select a node that least recently used for write requests.
                GridNode node = nodeSelector.selectNode(replicatedNodes, config);
                assert (node != null);
                List<String> mappedPaths = assignMap.get(node);
                if(mappedPaths == null) {
                    mappedPaths = new ArrayList<String>(16);
                    assignMap.put(node, mappedPaths);
                }
                mappedPaths.add(path);
            }
        }

        final Map<GridTask, GridNode> map = new IdentityHashMap<GridTask, GridNode>(assignMap.size() + 1);
        for(Map.Entry<GridNode, List<String>> e : assignMap.entrySet()) {
            GridNode node = e.getKey();
            List<String> mappedPaths = e.getValue();
            DispatchQueryExecTask dispatchTask = new DispatchQueryExecTask(execJob, _bindingVar, _bodyExpr, _exprBytes, mappedPaths, true);
            map.put(dispatchTask, node);
        }
        if(!localExecResources.isEmpty()) {
View Full Code Here

Examples of gridool.GridNode

        for(Map.Entry<String, List<GridNode>> entry : mapping.entrySet()) {
            final String key = entry.getKey();
            final List<GridNode> candidateNodes = entry.getValue();
            assert (!candidateNodes.isEmpty());

            final GridNode node = selector.selectNode(candidateNodes, null, config);
            candidateNodes.clear(); // let GC do its work

            List<String> mappedKeys = nodeKeysMap.get(node);
            if(mappedKeys == null) {
                mappedKeys = new ArrayList<String>(128);
View Full Code Here

Examples of gridool.GridNode

                }
                if(replicatedNodes == null || replicatedNodes.isEmpty()) {
                    throw new GridException("No replicated document found for path: " + path);
                }
                // TODO Select a node that least recently used for write requests.
                GridNode node = nodeSelector.selectNode(replicatedNodes, this, config);
                assert (node != null);
                List<String> mappedPaths = assignMap.get(node);
                if(mappedPaths == null) {
                    mappedPaths = new ArrayList<String>(16);
                    assignMap.put(node, mappedPaths);
                }
                mappedPaths.add(path);
            }
        }

        final Map<GridTask, GridNode> map = new IdentityHashMap<GridTask, GridNode>(assignMap.size() + 1);
        for(Map.Entry<GridNode, List<String>> e : assignMap.entrySet()) {
            GridNode node = e.getKey();
            List<String> mappedPaths = e.getValue();
            DispatchQueryExecTask dispatchTask = new DispatchQueryExecTask(execJob, bindingVar, bodyExpr, mappedPaths, true);
            map.put(dispatchTask, node);
        }
        if(!localExecResources.isEmpty()) {
View Full Code Here

Examples of org.drools.grid.GridNode

     * 2) unmarshalling route (for unmarshalling command results)
     * 3) marshalling route (enables creating commands through API and converting to XML)
     */
    private CamelContext configure(StatefulKnowledgeSession session) throws Exception {
        GridImpl grid = new GridImpl(new HashMap<String, Object>());       
        GridNode node = grid.createGridNode("testnode");

        Context context = new JndiContext();
        context.bind("testnode", node);
        node.set("ksession", session);

        CamelContext camelContext = new DefaultCamelContext(context);
        camelContext.addRoutes(new RouteBuilder() {
            @Override
            public void configure() throws Exception {         
View Full Code Here

Examples of org.drools.grid.GridNode

     * 2) unmarshalling route (for unmarshalling command results)
     * 3) marshalling route (enables creating commands through API and converting to JSON)
     */
    private CamelContext configure(StatefulKnowledgeSession session) throws Exception {
        GridImpl grid = new GridImpl(new HashMap());
        GridNode node = grid.createGridNode("testnode");
        Context context = new JndiContext();
        context.bind("testnode", node);
        node.set("ksession", session);
       
        CamelContext camelContext = new DefaultCamelContext(context);
        camelContext.addRoutes(new RouteBuilder() {
            @Override
            public void configure() throws Exception {
View Full Code Here

Examples of org.drools.grid.GridNode

     * 2) unmarshalling route (for unmarshalling command results)
     * 3) marshalling route (enables creating commands through API and converting to JSON)
     */
    private CamelContext configure(StatefulKnowledgeSession session) throws Exception {
        GridImpl grid = new GridImpl(new HashMap());
        GridNode node = grid.createGridNode("testnode");
        Context context = new JndiContext();
        context.bind("testnode", node);
        node.set("ksession", session);
       
        CamelContext camelContext = new DefaultCamelContext(context);
        camelContext.addRoutes(new RouteBuilder() {
            @Override
            public void configure() throws Exception {
View Full Code Here

Examples of org.drools.grid.GridNode

     * 2) unmarshalling route (for unmarshalling command results)
     * 3) marshalling route (enables creating commands through API and converting to XML)
     */
    private CamelContext configure(StatefulKnowledgeSession session) throws Exception {
        GridImpl grid = new GridImpl(new HashMap<String, Object>());       
        GridNode node = grid.createGridNode("testnode");

        Context context = new JndiContext();
        context.bind("testnode", node);
        node.set("ksession", session);

        CamelContext camelContext = new DefaultCamelContext(context);
        camelContext.addRoutes(new RouteBuilder() {
            @Override
            public void configure() throws Exception {         
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.