Examples of EventFactHandle


Examples of org.drools.common.EventFactHandle

    @Test
    public void testStarts() {
        registry.addEvaluatorDefinition( DuringEvaluatorDefinition.class.getName() );

        EventFactHandle foo = new EventFactHandle( 1,
                                                   "foo",
                                                   1,
                                                   2,
                                                   10,
                                                   new DisconnectedWorkingMemoryEntryPoint( "DEFAULT" ) );
        EventFactHandle bar = new EventFactHandle( 2,
                                                   "bar",
                                                   1,
                                                   2,
                                                   7,
                                                   new DisconnectedWorkingMemoryEntryPoint( "DEFAULT" ) );
        EventFactHandle drool = new EventFactHandle( 1,
                                                     "drool",
                                                     1,
                                                     2,
                                                     10,
                                                     new DisconnectedWorkingMemoryEntryPoint( "DEFAULT" ) );
        EventFactHandle mole = new EventFactHandle( 1,
                                                    "mole",
                                                    1,
                                                    1,
                                                    4,
                                                    new DisconnectedWorkingMemoryEntryPoint( "DEFAULT" ) );
View Full Code Here

Examples of org.drools.common.EventFactHandle

    @Test
    public void testStartedBy() {
        registry.addEvaluatorDefinition( DuringEvaluatorDefinition.class.getName() );

        EventFactHandle foo = new EventFactHandle( 1,
                                                   "foo",
                                                   1,
                                                   2,
                                                   10,
                                                   new DisconnectedWorkingMemoryEntryPoint( "DEFAULT" ) );
        EventFactHandle bar = new EventFactHandle( 2,
                                                   "bar",
                                                   1,
                                                   2,
                                                   7,
                                                   new DisconnectedWorkingMemoryEntryPoint( "DEFAULT" ) );
        EventFactHandle drool = new EventFactHandle( 1,
                                                     "drool",
                                                     1,
                                                     2,
                                                     10,
                                                     new DisconnectedWorkingMemoryEntryPoint( "DEFAULT" ) );
        EventFactHandle mole = new EventFactHandle( 1,
                                                    "mole",
                                                    1,
                                                    1,
                                                    6,
                                                    new DisconnectedWorkingMemoryEntryPoint( "DEFAULT" ) );
View Full Code Here

Examples of org.drools.common.EventFactHandle

    @Test
    public void testMeets() {
        registry.addEvaluatorDefinition( DuringEvaluatorDefinition.class.getName() );

        EventFactHandle foo = new EventFactHandle( 1,
                                                   "foo",
                                                   1,
                                                   2,
                                                   8,
                                                   new DisconnectedWorkingMemoryEntryPoint( "DEFAULT" ) );
        EventFactHandle bar = new EventFactHandle( 2,
                                                   "bar",
                                                   1,
                                                   10,
                                                   7,
                                                   new DisconnectedWorkingMemoryEntryPoint( "DEFAULT" ) );
        EventFactHandle drool = new EventFactHandle( 1,
                                                     "drool",
                                                     1,
                                                     8,
                                                     5,
                                                     new DisconnectedWorkingMemoryEntryPoint( "DEFAULT" ) );
        EventFactHandle mole = new EventFactHandle( 1,
                                                    "mole",
                                                    1,
                                                    11,
                                                    4,
                                                    new DisconnectedWorkingMemoryEntryPoint( "DEFAULT" ) );
View Full Code Here

Examples of org.drools.common.EventFactHandle

    @Test
    public void testMetBy() {
        registry.addEvaluatorDefinition( DuringEvaluatorDefinition.class.getName() );

        EventFactHandle foo = new EventFactHandle( 1,
                                                   "foo",
                                                   1,
                                                   10,
                                                   8,
                                                   new DisconnectedWorkingMemoryEntryPoint( "DEFAULT" ) );
        EventFactHandle bar = new EventFactHandle( 2,
                                                   "bar",
                                                   1,
                                                   2,
                                                   8,
                                                   new DisconnectedWorkingMemoryEntryPoint( "DEFAULT" ) );
        EventFactHandle drool = new EventFactHandle( 1,
                                                     "drool",
                                                     1,
                                                     5,
                                                     3,
                                                     new DisconnectedWorkingMemoryEntryPoint( "DEFAULT" ) );
        EventFactHandle mole = new EventFactHandle( 1,
                                                    "mole",
                                                    1,
                                                    4,
                                                    7,
                                                    new DisconnectedWorkingMemoryEntryPoint( "DEFAULT" ) );
View Full Code Here

Examples of org.drools.common.EventFactHandle

    @Test
    public void testOverlaps() {
        registry.addEvaluatorDefinition( DuringEvaluatorDefinition.class.getName() );

        EventFactHandle foo = new EventFactHandle( 1,
                                                   "foo",
                                                   1,
                                                   2,
                                                   8,
                                                   new DisconnectedWorkingMemoryEntryPoint( "DEFAULT" ) );
        EventFactHandle bar = new EventFactHandle( 2,
                                                   "bar",
                                                   1,
                                                   7,
                                                   7,
                                                   new DisconnectedWorkingMemoryEntryPoint( "DEFAULT" ) );
        EventFactHandle drool = new EventFactHandle( 1,
                                                     "drool",
                                                     1,
                                                     11,
                                                     5,
                                                     new DisconnectedWorkingMemoryEntryPoint( "DEFAULT" ) );
        EventFactHandle mole = new EventFactHandle( 1,
                                                    "mole",
                                                    1,
                                                    5,
                                                    5,
                                                    new DisconnectedWorkingMemoryEntryPoint( "DEFAULT" ) );
View Full Code Here

Examples of org.drools.common.EventFactHandle

    @Test
    public void testOverlapedBy() {
        registry.addEvaluatorDefinition( DuringEvaluatorDefinition.class.getName() );

        EventFactHandle foo = new EventFactHandle( 1,
                                                   "foo",
                                                   1,
                                                   7,
                                                   8,
                                                   new DisconnectedWorkingMemoryEntryPoint( "DEFAULT" ) );
        EventFactHandle bar = new EventFactHandle( 2,
                                                   "bar",
                                                   1,
                                                   2,
                                                   8,
                                                   new DisconnectedWorkingMemoryEntryPoint( "DEFAULT" ) );
        EventFactHandle drool = new EventFactHandle( 1,
                                                     "drool",
                                                     1,
                                                     11,
                                                     5,
                                                     new DisconnectedWorkingMemoryEntryPoint( "DEFAULT" ) );
        EventFactHandle mole = new EventFactHandle( 1,
                                                    "mole",
                                                    1,
                                                    7,
                                                    3,
                                                    new DisconnectedWorkingMemoryEntryPoint( "DEFAULT" ) );
View Full Code Here

Examples of org.drools.core.common.EventFactHandle

                                                     _handle.getId(),
                                                     _handle.getRecency() );
                break;
            }
            case EVENT : {
                handle = new EventFactHandle( _handle.getId(),
                                              object,
                                              _handle.getRecency(),
                                              _handle.getTimestamp(),
                                              _handle.getDuration(),
                                              entryPoint,
View Full Code Here

Examples of org.drools.core.common.EventFactHandle

                                                     id,
                                                     recency );
                break;
            }
            case 2: {
                handle = new EventFactHandle( id, object, recency, startTimeStamp, duration, entryPoint, typeConf != null && typeConf.isTrait() );
                ( (EventFactHandle) handle ).setExpired( expired );
                ( (EventFactHandle) handle ).setActivationsCount( activationsCount );
                break;
            }
            default: {
View Full Code Here

Examples of org.drools.core.common.EventFactHandle

        _handle.setId( handle.getId() );
        _handle.setRecency( handle.getRecency() );

        if ( _handle.getType() == ProtobufMessages.FactHandle.HandleType.EVENT ) {
            // is event
            EventFactHandle efh = (EventFactHandle) handle;
            _handle.setTimestamp( efh.getStartTimestamp() );
            _handle.setDuration( efh.getDuration() );
            _handle.setIsExpired( efh.isExpired() );
            _handle.setActivationsCount( efh.getActivationsCount() );
        }

        if ( handle.getEqualityKey() != null &&
             handle.getEqualityKey().getStatus() == EqualityKey.JUSTIFIED ) {
            _handle.setIsJustified( true );
View Full Code Here

Examples of org.drools.core.common.EventFactHandle

    public String reportWMObjects(KieSession session) {
        PriorityQueue<String> queue = new PriorityQueue<String>();
        for (FactHandle fh : session.getFactHandles()) {
            Object o;
            if (fh instanceof EventFactHandle ) {
                EventFactHandle efh = (EventFactHandle) fh;
                queue.add("\t " + efh.getStartTimestamp() + "\t" + efh.getObject().toString() + "\n");
            } else {
                o = ((DefaultFactHandle) fh).getObject();
                queue.add("\t " + o.toString() + " >> " + System.identityHashCode( o.getClass() ) + "\n");
            }
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.