15981599160016011602160316041605160616071608
for ( int j = 0; j < N; j++ ) { ks.getWorkingMemoryEntryPoint( "x" ).insert( new Integer( j ) ); } Thread.sleep( 1000 ); ks.halt(); assertEquals( N, list.size() ); } @Test
2627282930313233343536
implements GenericCommand<Void> { public Void execute(Context context) { StatefulKnowledgeSession ksession = ((KnowledgeCommandContext) context).getStatefulKnowledgesession(); ksession.halt(); return null; } public String toString() { return "session.halt();";
75327533753475357536753775387539754075417542
try { Thread.currentThread().sleep( 1000 ); } catch ( InterruptedException e ) { } boolean aliveT2 = t2.isAlive(); ksession.halt(); try { Thread.currentThread().sleep( 1000 ); } catch ( InterruptedException e ) { } boolean aliveT1 = t1.isAlive();
75987599760076017602760376047605760676077608
t1.start(); Thread.currentThread().sleep( 500 ); ep.insert( new Person( "darth" ) ); Thread.currentThread().sleep( 500 ); ksession.halt(); t1.join( 5000 ); boolean alive = t1.isAlive(); if ( alive ) { t1.interrupt(); }
74917492749374947495749674977498749975007501
75567557755875597560756175627563756475657566
75137514751575167517751875197520752175227523
75797580758175827583758475857586758775887589
74977498749975007501750275037504750575067507
75637564756575667567756875697570757175727573