Package org.drools.grid.impl

Examples of org.drools.grid.impl.GridNodeImpl


    }


    @Test
    public void simpleEvictionTest() throws InterruptedException {
        MessageReceiverHandler handler = new GridNodeImpl("myNode").getMessageReceiverHandler();
        ContextImplWithEviction contextTemp = (ContextImplWithEviction) ((GridNodeServer) handler).getData().getTemp();
        ((ContextImplWithEviction) contextTemp).setEntryEvictionTime(2000); // 2 seconds
        ((ContextImplWithEviction) contextTemp).setEvictionWakeUpTime(1000); // 1 seconds
        JDKTimerService timer = new JDKTimerService(1);
View Full Code Here


        return true;
    }

    public void afterPropertiesSet() throws Exception {
        if ( this.node == null ) {
            this.node = new GridNodeImpl();
            //            GenericConnection connection = new GridConnection();
            //            connection.addExecutionNode(new LocalNodeConnector());
            //            connection.addDirectoryNode(new LocalDirectoryConnector());
            //            this.node = connection.getExecutionNode();
View Full Code Here

        assertNotNull( gnode );
    }

    @Test
    public void testConnectWithGivenGridNode() {
        GridNode gnode = new GridNodeImpl();
        GridConnection<GridNode> connection = new LocalGridNodeConnection( gnode );
        assertSame( gnode,
                    connection.connect() );
    }
View Full Code Here

        assertNotNull( gnode );
    }

    @Test
    public void testConnectWithGivenGridNode() {
        GridNode gnode = new GridNodeImpl();
        GridConnection<GridNode> connection = new LocalGridNodeConnection( gnode );
        assertSame( gnode,
                    connection.connect() );
    }
View Full Code Here

    }


    @Test
    public void simpleEvictionTest() throws InterruptedException {
        MessageReceiverHandler handler = new GridNodeImpl("myNode").getMessageReceiverHandler();
        ContextImplWithEviction contextTemp = (ContextImplWithEviction) ((GridNodeServer) handler).getData().getTemp();
        ((ContextImplWithEviction) contextTemp).setEntryEvictionTime(2000); // 2 seconds
        ((ContextImplWithEviction) contextTemp).setEvictionWakeUpTime(1000); // 1 seconds
        JDKTimerService timer = new JDKTimerService(1);
View Full Code Here

        return true;
    }

    public void afterPropertiesSet() throws Exception {
        if ( this.node == null ) {
            this.node = new GridNodeImpl();
            //            GenericConnection connection = new GridConnection();
            //            connection.addExecutionNode(new LocalNodeConnector());
            //            connection.addDirectoryNode(new LocalDirectoryConnector());
            //            this.node = connection.getExecutionNode();
View Full Code Here

    public LocalGridNodeConnection(GridNode gridNode) {
        this.gridNode = gridNode;
    }

    public LocalGridNodeConnection( String id, Grid grid ) {
        gridNode = new GridNodeImpl( id, grid );
    }
View Full Code Here

    public void setGnode(GridNode gnode) {
        this.gnode = gnode;
    }

    public void configureService( Grid grid ) {
        GridNode gnode = (this.gnode != null) ? this.gnode : new GridNodeImpl( grid );
        ((GridImpl) grid).addService( GridNode.class,
                                      gnode );
    }
View Full Code Here

TOP

Related Classes of org.drools.grid.impl.GridNodeImpl

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.