Package org.drools.time.impl

Examples of org.drools.time.impl.TrackableTimeJobFactoryManager


        KnowledgeBase knowledgeBase = KnowledgeBaseFactory.newKnowledgeBase( config );
        knowledgeBase.addKnowledgePackages( kbuilder.getKnowledgePackages() );

        KnowledgeSessionConfiguration ksconf = KnowledgeBaseFactory.newKnowledgeSessionConfiguration();
        ksconf.setOption( ClockTypeOption.get( "pseudo" ) );
        ((SessionConfiguration) ksconf).setTimerJobFactoryManager( new TrackableTimeJobFactoryManager( ) );
        StatefulKnowledgeSession ksession = knowledgeBase.newStatefulKnowledgeSession(ksconf, null);
       
        ksession.insert( new A() );

        ksession = marsallStatefulKnowledgeSession(ksession);  
View Full Code Here


        knowledgeBase.addKnowledgePackages( kbuilder.getKnowledgePackages() );

       
        KnowledgeSessionConfiguration ksconf = KnowledgeBaseFactory.newKnowledgeSessionConfiguration();
        ksconf.setOption( ClockTypeOption.get( "pseudo" ) );
        ((SessionConfiguration) ksconf).setTimerJobFactoryManager( new TrackableTimeJobFactoryManager( ) );
        StatefulKnowledgeSession ksession = knowledgeBase.newStatefulKnowledgeSession(ksconf, null);
       
        List list = new ArrayList();
        ksession.setGlobal( "list", list );
        WorkingMemoryEntryPoint aep = ksession.getWorkingMemoryEntryPoint( "a-ep" );
View Full Code Here

        knowledgeBase.addKnowledgePackages( kbuilder.getKnowledgePackages() );

       
        KnowledgeSessionConfiguration ksconf = KnowledgeBaseFactory.newKnowledgeSessionConfiguration();
        ksconf.setOption( ClockTypeOption.get( "pseudo" ) );
        ((SessionConfiguration) ksconf).setTimerJobFactoryManager( new TrackableTimeJobFactoryManager( ) );
        StatefulKnowledgeSession ksession = knowledgeBase.newStatefulKnowledgeSession(ksconf, null);
       
        List list = new ArrayList();
        ksession.setGlobal( "list", list );
        WorkingMemoryEntryPoint aep = ksession.getWorkingMemoryEntryPoint( "a-ep" );
View Full Code Here

        knowledgeBase.addKnowledgePackages( kbuilder.getKnowledgePackages() );

       
        KnowledgeSessionConfiguration ksconf = KnowledgeBaseFactory.newKnowledgeSessionConfiguration();
        ksconf.setOption( ClockTypeOption.get( "pseudo" ) );
        ((SessionConfiguration) ksconf).setTimerJobFactoryManager( new TrackableTimeJobFactoryManager( ) );
        StatefulKnowledgeSession ksession = knowledgeBase.newStatefulKnowledgeSession(ksconf, null);
       
        List list = new ArrayList();
        ksession.setGlobal( "list", list );
       
View Full Code Here

        knowledgeBase.addKnowledgePackages( kbuilder.getKnowledgePackages() );

       
        KnowledgeSessionConfiguration ksconf = KnowledgeBaseFactory.newKnowledgeSessionConfiguration();
        ksconf.setOption( ClockTypeOption.get( "pseudo" ) );
        ((SessionConfiguration) ksconf).setTimerJobFactoryManager( new TrackableTimeJobFactoryManager( ) );
        StatefulKnowledgeSession ksession = knowledgeBase.newStatefulKnowledgeSession(ksconf, null);
       
        List list = new ArrayList();
        ksession.setGlobal( "list", list );
       
View Full Code Here

        ByteArrayOutputStream out = new ByteArrayOutputStream();
        MarshallerFactory.newMarshaller( kbase ).marshall( out,
                                                           ksession );
       
        KnowledgeSessionConfiguration ksconf = KnowledgeBaseFactory.newKnowledgeSessionConfiguration();       
        ((SessionConfiguration) ksconf).setTimerJobFactoryManager( new TrackableTimeJobFactoryManager( ) );
        ksconf.setOption( ClockTypeOption.get( "pseudo" ) );
       
       
        ksession = MarshallerFactory.newMarshaller( kbase ).unmarshall( new ByteArrayInputStream( out.toByteArray() ), ksconf, null );
        ((StatefulKnowledgeSessionImpl)ksession).session.setGlobalResolver( (GlobalResolver) globals )
View Full Code Here

            KnowledgeBaseConfiguration config = KnowledgeBaseFactory.newKnowledgeBaseConfiguration();
            config.setOption(EventProcessingOption.STREAM);
            KnowledgeBase knowledgeBaseA = KnowledgeBaseFactory.newKnowledgeBase(config);
            KnowledgeSessionConfiguration ksconf = KnowledgeBaseFactory.newKnowledgeSessionConfiguration();
            ksconf.setOption(ClockTypeOption.get("pseudo"));
            ((SessionConfiguration) ksconf).setTimerJobFactoryManager(new TrackableTimeJobFactoryManager());
            ksessionA = knowledgeBaseA.newStatefulKnowledgeSession(ksconf, null);
        }

        StatefulKnowledgeSession ksessionB = null;
        {
            KnowledgeBaseConfiguration config = KnowledgeBaseFactory.newKnowledgeBaseConfiguration();
            config.setOption(EventProcessingOption.STREAM);
            KnowledgeBase knowledgeBase = KnowledgeBaseFactory.newKnowledgeBase(config);
            KnowledgeSessionConfiguration ksconf = KnowledgeBaseFactory.newKnowledgeSessionConfiguration();
            ksconf.setOption(ClockTypeOption.get("pseudo"));
            ((SessionConfiguration) ksconf).setTimerJobFactoryManager(new TrackableTimeJobFactoryManager());
            ksessionB = knowledgeBase.newStatefulKnowledgeSession(ksconf, null);
        }

        Assert.assertTrue(CompareViaReflectionUtil.class.getSimpleName() + " is broken!", compareInstances(ksessionA, ksessionB));
    }
View Full Code Here

        KnowledgeBase knowledgeBase = KnowledgeBaseFactory.newKnowledgeBase( config );
        knowledgeBase.addKnowledgePackages( kbuilder.getKnowledgePackages() );

        KnowledgeSessionConfiguration ksconf = KnowledgeBaseFactory.newKnowledgeSessionConfiguration();
        ksconf.setOption( ClockTypeOption.get( "pseudo" ) );
        ((SessionConfiguration) ksconf).setTimerJobFactoryManager( new TrackableTimeJobFactoryManager() );
        StatefulKnowledgeSession ksession = knowledgeBase.newStatefulKnowledgeSession( ksconf, null );

        ksession.insert( new A() );

        ksession = marsallStatefulKnowledgeSession( ksession );
View Full Code Here

        KnowledgeBase knowledgeBase = KnowledgeBaseFactory.newKnowledgeBase( config );
        knowledgeBase.addKnowledgePackages( kbuilder.getKnowledgePackages() );

        KnowledgeSessionConfiguration ksconf = KnowledgeBaseFactory.newKnowledgeSessionConfiguration();
        ksconf.setOption( ClockTypeOption.get( "pseudo" ) );
        ((SessionConfiguration) ksconf).setTimerJobFactoryManager( new TrackableTimeJobFactoryManager() );
        StatefulKnowledgeSession ksession = knowledgeBase.newStatefulKnowledgeSession( ksconf, null );

        List list = new ArrayList();
        ksession.setGlobal( "list", list );
        WorkingMemoryEntryPoint aep = ksession.getWorkingMemoryEntryPoint( "a-ep" );
View Full Code Here

        KnowledgeBase knowledgeBase = KnowledgeBaseFactory.newKnowledgeBase( config );
        knowledgeBase.addKnowledgePackages( kbuilder.getKnowledgePackages() );

        KnowledgeSessionConfiguration ksconf = KnowledgeBaseFactory.newKnowledgeSessionConfiguration();
        ksconf.setOption( ClockTypeOption.get( "pseudo" ) );
        ((SessionConfiguration) ksconf).setTimerJobFactoryManager( new TrackableTimeJobFactoryManager() );
        StatefulKnowledgeSession ksession = knowledgeBase.newStatefulKnowledgeSession( ksconf, null );

        List list = new ArrayList();
        ksession.setGlobal( "list", list );
        WorkingMemoryEntryPoint aep = ksession.getWorkingMemoryEntryPoint( "a-ep" );
View Full Code Here

TOP

Related Classes of org.drools.time.impl.TrackableTimeJobFactoryManager

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.