Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Renaming WorkingMemory to Session and WorkingMemoryEntryPoint to Sess…

…ionEntryPoint
  • Loading branch information...
commit 186935d68e2b673968ca4406f0ba8ece3c072436 1 parent eee863c
@etirelli etirelli authored
Showing with 148 additions and 148 deletions.
  1. +7 −7 drools-compiler/src/test/java/org/drools/integrationtests/CepEspTest.java
  2. +2 −2 drools-compiler/src/test/java/org/drools/integrationtests/DynamicRulesTest.java
  3. +3 −3 drools-compiler/src/test/java/org/drools/integrationtests/MiscTest.java
  4. +2 −2 drools-compiler/src/test/java/org/drools/integrationtests/MultithreadTest.java
  5. +15 −15 drools-compiler/src/test/java/org/drools/integrationtests/StreamsTest.java
  6. +2 −2 drools-compiler/src/test/java/org/drools/integrationtests/marshalling/FactHandleMarshallingTest.java
  7. +7 −7 drools-compiler/src/test/java/org/drools/integrationtests/marshalling/MarshallingTest.java
  8. +2 −2 drools-compiler/src/test/java/org/drools/lang/api/DescrBuilderTest.java
  9. +1 −1  drools-core/src/main/java/org/drools/WorkingMemoryEntryPoint.java
  10. +5 −5 drools-core/src/main/java/org/drools/base/DefaultKnowledgeHelper.java
  11. +3 −3 drools-core/src/main/java/org/drools/base/SequentialKnowledgeHelper.java
  12. +3 −3 drools-core/src/main/java/org/drools/command/ResolvingKnowledgeCommandContext.java
  13. +3 −3 drools-core/src/main/java/org/drools/command/impl/CommandBasedStatefulKnowledgeSession.java
  14. +5 −5 drools-core/src/main/java/org/drools/command/impl/FixedKnowledgeCommandContext.java
  15. +2 −2 drools-core/src/main/java/org/drools/command/impl/KnowledgeCommandContext.java
  16. +3 −3 drools-core/src/main/java/org/drools/command/runtime/rule/GetWorkingMemoryEntryPointCommand.java
  17. +3 −3 drools-core/src/main/java/org/drools/command/runtime/rule/GetWorkingMemoryEntryPointsCommand.java
  18. +2 −2 drools-core/src/main/java/org/drools/command/runtime/rule/InsertElementsCommand.java
  19. +2 −2 drools-core/src/main/java/org/drools/command/runtime/rule/InsertObjectInEntryPointCommand.java
  20. +2 −2 drools-core/src/main/java/org/drools/command/runtime/rule/ModifyCommand.java
  21. +4 −4 drools-core/src/main/java/org/drools/common/AbstractFactHandleFactory.java
  22. +6 −6 drools-core/src/main/java/org/drools/common/DefaultFactHandle.java
  23. +3 −3 drools-core/src/main/java/org/drools/common/DisconnectedFactHandle.java
  24. +2 −2 drools-core/src/main/java/org/drools/common/DisconnectedWorkingMemoryEntryPoint.java
  25. +2 −2 drools-core/src/main/java/org/drools/common/EventFactHandle.java
  26. +3 −3 drools-core/src/main/java/org/drools/common/InternalFactHandle.java
  27. +2 −2 drools-core/src/main/java/org/drools/common/InternalWorkingMemory.java
  28. +2 −2 drools-core/src/main/java/org/drools/common/InternalWorkingMemoryEntryPoint.java
  29. +3 −3 drools-core/src/main/java/org/drools/common/QueryElementFactHandle.java
  30. +3 −3 drools-core/src/main/java/org/drools/impl/StatefulKnowledgeSessionImpl.java
  31. +3 −3 drools-core/src/main/java/org/drools/marshalling/impl/InputMarshaller.java
  32. +2 −2 drools-core/src/main/java/org/drools/marshalling/impl/OutputMarshaller.java
  33. +5 −5 drools-core/src/main/java/org/drools/marshalling/impl/ProtobufInputMarshaller.java
  34. +3 −3 drools-core/src/main/java/org/drools/marshalling/impl/ProtobufOutputMarshaller.java
  35. +3 −3 drools-core/src/main/java/org/drools/reteoo/DisposedReteooWorkingMemory.java
  36. +2 −2 drools-core/src/main/java/org/drools/reteoo/ReteooFactHandleFactory.java
  37. +2 −2 drools-core/src/main/java/org/drools/reteoo/ReteooWorkingMemoryInterface.java
  38. +2 −2 drools-core/src/main/java/org/drools/runtime/rule/impl/DefaultConsequenceExceptionHandler.java
  39. +3 −3 drools-core/src/main/java/org/drools/spi/FactHandleFactory.java
  40. +3 −3 drools-core/src/main/java/org/drools/spi/KnowledgeHelper.java
  41. +1 −1  drools-core/src/test/java/org/drools/reteoo/AgendaTest.java
  42. +2 −2 drools-core/src/test/java/org/drools/reteoo/ReteooWorkingMemoryTest.java
  43. +2 −2 drools-examples/src/main/java/org/drools/benchmark/waltz/WaltzBenchmark.java
  44. +5 −5 drools-examples/src/main/java/org/drools/games/pong/PongUI.java
  45. +2 −2 drools-jsr94/src/main/java/org/drools/jsr94/rules/Jsr94EventFactHandle.java
  46. +2 −2 drools-jsr94/src/main/java/org/drools/jsr94/rules/Jsr94FactHandle.java
  47. +2 −2 drools-jsr94/src/main/java/org/drools/jsr94/rules/Jsr94FactHandleFactory.java
View
14 drools-compiler/src/test/java/org/drools/integrationtests/CepEspTest.java
@@ -63,7 +63,7 @@
import org.kie.runtime.conf.ClockTypeOption;
import org.kie.runtime.rule.FactHandle;
import org.kie.runtime.rule.Match;
-import org.kie.runtime.rule.WorkingMemoryEntryPoint;
+import org.kie.runtime.rule.SessionEntryPoint;
import org.kie.time.SessionClock;
import org.mockito.ArgumentCaptor;
@@ -427,7 +427,7 @@ public void testEventExpiration4() throws Exception {
StatefulKnowledgeSession ksession = createKnowledgeSession(kbase, sconf);
- WorkingMemoryEntryPoint eventStream = ksession.getWorkingMemoryEntryPoint( "Event Stream" );
+ SessionEntryPoint eventStream = ksession.getWorkingMemoryEntryPoint( "Event Stream" );
SessionPseudoClock clock = (SessionPseudoClock) ksession.<SessionClock>getSessionClock();
@@ -1834,7 +1834,7 @@ public void testIdentityAssertBehaviorOnEntryPoints() throws IOException,
final StatefulKnowledgeSession ksession = kbase1.newStatefulKnowledgeSession();
AgendaEventListener ael1 = mock( AgendaEventListener.class );
ksession.addEventListener( ael1 );
- WorkingMemoryEntryPoint ep1 = ksession.getWorkingMemoryEntryPoint( "stocktick stream" );
+ SessionEntryPoint ep1 = ksession.getWorkingMemoryEntryPoint( "stocktick stream" );
FactHandle fh1 = ep1.insert( st1 );
FactHandle fh1_2 = ep1.insert( st1 );
@@ -1882,7 +1882,7 @@ public void testEqualityAssertBehaviorOnEntryPoints() throws IOException,
final StatefulKnowledgeSession ksession1 = kbase1.newStatefulKnowledgeSession();
AgendaEventListener ael1 = mock( AgendaEventListener.class );
ksession1.addEventListener( ael1 );
- WorkingMemoryEntryPoint ep1 = ksession1.getWorkingMemoryEntryPoint( "stocktick stream" );
+ SessionEntryPoint ep1 = ksession1.getWorkingMemoryEntryPoint( "stocktick stream" );
FactHandle fh1 = ep1.insert( st1 );
FactHandle fh1_2 = ep1.insert( st1 );
@@ -1967,7 +1967,7 @@ public void testTemporalOperators2() throws Exception {
StatefulKnowledgeSession ksession = createKnowledgeSession(kbase, sconf);
SessionPseudoClock clock = (SessionPseudoClock) ksession.<SessionClock>getSessionClock();
- WorkingMemoryEntryPoint ep = ksession.getWorkingMemoryEntryPoint( "X" );
+ SessionEntryPoint ep = ksession.getWorkingMemoryEntryPoint( "X" );
clock.advanceTime( 1000,
TimeUnit.SECONDS );
@@ -2008,7 +2008,7 @@ public void testTemporalOperatorsInfinity() throws Exception {
null );
SessionPseudoClock clock = (SessionPseudoClock) ksession.<SessionClock>getSessionClock();
- WorkingMemoryEntryPoint ep = ksession.getWorkingMemoryEntryPoint( "X" );
+ SessionEntryPoint ep = ksession.getWorkingMemoryEntryPoint( "X" );
clock.advanceTime( 1000,
TimeUnit.SECONDS );
@@ -2179,7 +2179,7 @@ public void testCloudModeExpiration() throws IOException,
KnowledgeBase kbase = loadKnowledgeBaseFromString( config, str );
StatefulKnowledgeSession ksession = createKnowledgeSession(kbase);
- WorkingMemoryEntryPoint ep = ksession.getWorkingMemoryEntryPoint( "X" );
+ SessionEntryPoint ep = ksession.getWorkingMemoryEntryPoint( "X" );
ep.insert( new StockTick( 1,
"RHT",
View
4 drools-compiler/src/test/java/org/drools/integrationtests/DynamicRulesTest.java
@@ -75,7 +75,7 @@
import org.kie.runtime.Environment;
import org.kie.runtime.EnvironmentName;
import org.kie.runtime.StatefulKnowledgeSession;
-import org.kie.runtime.rule.WorkingMemoryEntryPoint;
+import org.kie.runtime.rule.SessionEntryPoint;
public class DynamicRulesTest extends CommonTestMethodBase {
@@ -911,7 +911,7 @@ public void testDynamicRuleAdditionsWithEntryPoints() throws Exception {
ksession.setGlobal( "results",
results );
- WorkingMemoryEntryPoint ep = ksession.getWorkingMemoryEntryPoint( "in-channel" );
+ SessionEntryPoint ep = ksession.getWorkingMemoryEntryPoint( "in-channel" );
ep.insert( new StockTick( 1,
"RHT",
20,
View
6 drools-compiler/src/test/java/org/drools/integrationtests/MiscTest.java
@@ -152,7 +152,7 @@
import org.kie.runtime.EnvironmentName;
import org.kie.runtime.StatefulKnowledgeSession;
import org.kie.runtime.StatelessKnowledgeSession;
-import org.kie.runtime.rule.WorkingMemoryEntryPoint;
+import org.kie.runtime.rule.SessionEntryPoint;
import org.mockito.ArgumentCaptor;
import org.mockito.Mockito;
import org.mvel2.MVEL;
@@ -6127,7 +6127,7 @@ public void testFireUntilHaltFailingAcrossEntryPoints() throws Exception {
kbase.addKnowledgePackages( kbuilder.getKnowledgePackages() );
final StatefulKnowledgeSession ksession = createKnowledgeSession( kbase );
- final WorkingMemoryEntryPoint ep = ksession.getWorkingMemoryEntryPoint( "testep2" );
+ final SessionEntryPoint ep = ksession.getWorkingMemoryEntryPoint( "testep2" );
List list = new ArrayList();
ksession.setGlobal( "list",
@@ -6193,7 +6193,7 @@ public void testNetworkBuildErrorAcrossEntryPointsAndFroms() throws Exception {
kbase.addKnowledgePackages( kbuilder.getKnowledgePackages() );
final StatefulKnowledgeSession ksession = createKnowledgeSession( kbase );
- final WorkingMemoryEntryPoint ep = ksession.getWorkingMemoryEntryPoint( "testep" );
+ final SessionEntryPoint ep = ksession.getWorkingMemoryEntryPoint( "testep" );
List list = new ArrayList();
ksession.setGlobal( "list",
View
4 drools-compiler/src/test/java/org/drools/integrationtests/MultithreadTest.java
@@ -35,7 +35,7 @@
import org.kie.conf.EventProcessingOption;
import org.kie.runtime.StatefulKnowledgeSession;
import org.kie.runtime.rule.FactHandle;
-import org.kie.runtime.rule.WorkingMemoryEntryPoint;
+import org.kie.runtime.rule.SessionEntryPoint;
/**
* This is a test case for multi-thred issues
@@ -150,7 +150,7 @@ public void testSlidingTimeWindows() {
kbconf.setOption(EventProcessingOption.STREAM);
KnowledgeBase kbase = loadKnowledgeBaseFromString(kbconf, str);
final StatefulKnowledgeSession ksession = kbase.newStatefulKnowledgeSession();
- final WorkingMemoryEntryPoint ep = ksession.getWorkingMemoryEntryPoint("X");
+ final SessionEntryPoint ep = ksession.getWorkingMemoryEntryPoint("X");
Executor executor = Executors.newCachedThreadPool(new ThreadFactory() {
public Thread newThread(Runnable r) {
View
30 drools-compiler/src/test/java/org/drools/integrationtests/StreamsTest.java
@@ -63,7 +63,7 @@
import org.kie.runtime.KieSessionConfiguration;
import org.kie.runtime.StatefulKnowledgeSession;
import org.kie.runtime.conf.ClockTypeOption;
-import org.kie.runtime.rule.WorkingMemoryEntryPoint;
+import org.kie.runtime.rule.SessionEntryPoint;
import org.kie.time.SessionClock;
import org.mockito.ArgumentCaptor;
@@ -168,7 +168,7 @@ public void testEventAssertion() throws Exception {
50,
System.currentTimeMillis());
- WorkingMemoryEntryPoint entry = session.getWorkingMemoryEntryPoint("StockStream");
+ SessionEntryPoint entry = session.getWorkingMemoryEntryPoint("StockStream");
InternalFactHandle handle5 = (InternalFactHandle) entry.insert(tick5);
InternalFactHandle handle6 = (InternalFactHandle) entry.insert(tick6);
@@ -221,7 +221,7 @@ public void testEntryPointReference() throws Exception {
50,
System.currentTimeMillis());
- WorkingMemoryEntryPoint entry = session.getWorkingMemoryEntryPoint("stream1");
+ SessionEntryPoint entry = session.getWorkingMemoryEntryPoint("stream1");
InternalFactHandle handle5 = (InternalFactHandle) entry.insert(tick5);
InternalFactHandle handle6 = (InternalFactHandle) entry.insert(tick6);
@@ -274,7 +274,7 @@ public void testModifyRetracOnEntryPointFacts() throws Exception {
50,
System.currentTimeMillis() );
- WorkingMemoryEntryPoint entry = session.getWorkingMemoryEntryPoint( "stream1" );
+ SessionEntryPoint entry = session.getWorkingMemoryEntryPoint( "stream1" );
InternalFactHandle handle5 = (InternalFactHandle) entry.insert( tick5 );
InternalFactHandle handle6 = (InternalFactHandle) entry.insert( tick6 );
@@ -345,9 +345,9 @@ public void testModifyOnEntryPointFacts() throws Exception {
org.kie.event.rule.AgendaEventListener ael = mock(org.kie.event.rule.AgendaEventListener.class);
ksession.addEventListener(ael);
- WorkingMemoryEntryPoint ep1 = ksession.getWorkingMemoryEntryPoint("ep1");
- WorkingMemoryEntryPoint ep2 = ksession.getWorkingMemoryEntryPoint("ep2");
- WorkingMemoryEntryPoint ep3 = ksession.getWorkingMemoryEntryPoint("ep3");
+ SessionEntryPoint ep1 = ksession.getWorkingMemoryEntryPoint("ep1");
+ SessionEntryPoint ep2 = ksession.getWorkingMemoryEntryPoint("ep2");
+ SessionEntryPoint ep3 = ksession.getWorkingMemoryEntryPoint("ep3");
ep1.insert(new StockTick(1,
"RHT",
@@ -396,7 +396,7 @@ public void testEntryPointWithAccumulateAndMVEL() throws Exception {
org.kie.event.rule.AgendaEventListener ael = mock(org.kie.event.rule.AgendaEventListener.class);
ksession.addEventListener(ael);
- WorkingMemoryEntryPoint ep1 = ksession.getWorkingMemoryEntryPoint("ep1");
+ SessionEntryPoint ep1 = ksession.getWorkingMemoryEntryPoint("ep1");
ep1.insert(new StockTick(1,
"RHT",
@@ -421,11 +421,11 @@ public void testGetEntryPointList() throws Exception {
KnowledgeBase kbase = loadKnowledgeBase("test_EntryPointReference.drl");
StatefulKnowledgeSession session = kbase.newStatefulKnowledgeSession();
- WorkingMemoryEntryPoint def = session.getWorkingMemoryEntryPoint(EntryPoint.DEFAULT.getEntryPointId());
- WorkingMemoryEntryPoint s1 = session.getWorkingMemoryEntryPoint("stream1");
- WorkingMemoryEntryPoint s2 = session.getWorkingMemoryEntryPoint( "stream2" );
- WorkingMemoryEntryPoint s3 = session.getWorkingMemoryEntryPoint( "stream3" );
- Collection<? extends WorkingMemoryEntryPoint> eps = session.getWorkingMemoryEntryPoints();
+ SessionEntryPoint def = session.getWorkingMemoryEntryPoint(EntryPoint.DEFAULT.getEntryPointId());
+ SessionEntryPoint s1 = session.getWorkingMemoryEntryPoint("stream1");
+ SessionEntryPoint s2 = session.getWorkingMemoryEntryPoint( "stream2" );
+ SessionEntryPoint s3 = session.getWorkingMemoryEntryPoint( "stream3" );
+ Collection<? extends SessionEntryPoint> eps = session.getWorkingMemoryEntryPoints();
assertEquals( 4,
eps.size() );
@@ -627,7 +627,7 @@ public void testWindowDeclaration() throws Exception {
AgendaEventListener ael = mock(AgendaEventListener.class);
ksession.addEventListener(ael);
- WorkingMemoryEntryPoint ep = ksession.getWorkingMemoryEntryPoint("ticks");
+ SessionEntryPoint ep = ksession.getWorkingMemoryEntryPoint("ticks");
ep.insert(new StockTick(1, "ACME", 20, 1000)); // not in the window
ep.insert(new StockTick(2, "RHT", 20, 1000)); // not > 20
ep.insert(new StockTick(3, "RHT", 30, 1000));
@@ -678,7 +678,7 @@ public void testWindowDeclaration2() throws Exception {
AgendaEventListener ael = mock(AgendaEventListener.class);
ksession.addEventListener(ael);
- WorkingMemoryEntryPoint ep = ksession.getWorkingMemoryEntryPoint("data");
+ SessionEntryPoint ep = ksession.getWorkingMemoryEntryPoint("data");
ep.insert(Double.valueOf( 10 ));
ep.insert(Double.valueOf( 11 ));
ep.insert(Double.valueOf( 12 ));
View
4 drools-compiler/src/test/java/org/drools/integrationtests/marshalling/FactHandleMarshallingTest.java
@@ -43,7 +43,7 @@
import org.kie.marshalling.ObjectMarshallingStrategy;
import org.kie.runtime.KieSessionConfiguration;
import org.kie.runtime.conf.ClockTypeOption;
-import org.kie.runtime.rule.WorkingMemoryEntryPoint;
+import org.kie.runtime.rule.SessionEntryPoint;
public class FactHandleMarshallingTest {
@@ -60,7 +60,7 @@ private InternalFactHandle createEventFactHandle(AbstractWorkingMemory wm, RuleB
Rete rete = ((ReteooRuleBase) ruleBase).getRete();
RuleBasePartitionId partionId = new RuleBasePartitionId("P-MAIN");
EntryPointNode entryPointNode = new EntryPointNode(1, partionId, false, (ObjectSource) rete , EntryPoint.DEFAULT);
- WorkingMemoryEntryPoint wmEntryPoint = new NamedEntryPoint(EntryPoint.DEFAULT, entryPointNode, wm);
+ SessionEntryPoint wmEntryPoint = new NamedEntryPoint(EntryPoint.DEFAULT, entryPointNode, wm);
EventFactHandle factHandle = new EventFactHandle(1, (Object) new Person(),0, (new Date()).getTime(), 0, wmEntryPoint);
return factHandle;
View
14 drools-compiler/src/test/java/org/drools/integrationtests/marshalling/MarshallingTest.java
@@ -97,7 +97,7 @@
import org.kie.runtime.StatefulKnowledgeSession;
import org.kie.runtime.conf.ClockTypeOption;
import org.kie.runtime.conf.TimerJobFactoryOption;
-import org.kie.runtime.rule.WorkingMemoryEntryPoint;
+import org.kie.runtime.rule.SessionEntryPoint;
import org.kie.time.SessionClock;
public class MarshallingTest extends CommonTestMethodBase {
@@ -2781,17 +2781,17 @@ public void testMarshallEntryPointsWithExpires() throws Exception {
List list = new ArrayList();
ksession.setGlobal( "list", list );
- WorkingMemoryEntryPoint aep = ksession.getWorkingMemoryEntryPoint( "a-ep" );
+ SessionEntryPoint aep = ksession.getWorkingMemoryEntryPoint( "a-ep" );
aep.insert( new A() );
ksession = marsallStatefulKnowledgeSession( ksession );
- WorkingMemoryEntryPoint bep = ksession.getWorkingMemoryEntryPoint( "b-ep" );
+ SessionEntryPoint bep = ksession.getWorkingMemoryEntryPoint( "b-ep" );
bep.insert( new B() );
ksession = marsallStatefulKnowledgeSession( ksession );
- WorkingMemoryEntryPoint cep = ksession.getWorkingMemoryEntryPoint( "c-ep" );
+ SessionEntryPoint cep = ksession.getWorkingMemoryEntryPoint( "c-ep" );
cep.insert( new C() );
ksession = marsallStatefulKnowledgeSession( ksession );
@@ -2874,7 +2874,7 @@ public void testMarshallEntryPointsWithNot() throws Exception {
List list = new ArrayList();
ksession.setGlobal( "list", list );
- WorkingMemoryEntryPoint aep = ksession.getWorkingMemoryEntryPoint( "a-ep" );
+ SessionEntryPoint aep = ksession.getWorkingMemoryEntryPoint( "a-ep" );
aep.insert( new A() );
ksession = marsallStatefulKnowledgeSession( ksession );
@@ -2937,7 +2937,7 @@ public void testMarshallEntryPointsWithSlidingTimeWindow() throws Exception {
List list = new ArrayList();
ksession.setGlobal( "list", list );
- WorkingMemoryEntryPoint aep = ksession.getWorkingMemoryEntryPoint( "a-ep" );
+ SessionEntryPoint aep = ksession.getWorkingMemoryEntryPoint( "a-ep" );
aep.insert( new A() );
ksession = marsallStatefulKnowledgeSession( ksession );
@@ -3021,7 +3021,7 @@ public void testMarshallEntryPointsWithSlidingLengthWindow() throws Exception {
List list = new ArrayList();
ksession.setGlobal( "list", list );
- WorkingMemoryEntryPoint aep = ksession.getWorkingMemoryEntryPoint( "a-ep" );
+ SessionEntryPoint aep = ksession.getWorkingMemoryEntryPoint( "a-ep" );
aep.insert( new A() );
ksession = marsallStatefulKnowledgeSession( ksession );
View
4 drools-compiler/src/test/java/org/drools/lang/api/DescrBuilderTest.java
@@ -40,7 +40,7 @@
import org.kie.io.ResourceFactory;
import org.kie.io.ResourceType;
import org.kie.runtime.StatefulKnowledgeSession;
-import org.kie.runtime.rule.WorkingMemoryEntryPoint;
+import org.kie.runtime.rule.SessionEntryPoint;
import org.mockito.ArgumentCaptor;
/**
@@ -496,7 +496,7 @@ public void testFromEntryPoint() throws InstantiationException,
kbase.addKnowledgePackages( Collections.singletonList( kpkg ) );
StatefulKnowledgeSession ksession = createKnowledgeSession(kbase);
- WorkingMemoryEntryPoint ep = ksession.getWorkingMemoryEntryPoint( "EventStream" );
+ SessionEntryPoint ep = ksession.getWorkingMemoryEntryPoint( "EventStream" );
ep.insert( "Hello World!" );
int rules = ksession.fireAllRules();
assertEquals( 1, rules );
View
2  drools-core/src/main/java/org/drools/WorkingMemoryEntryPoint.java
@@ -23,7 +23,7 @@
* An interface for instances that allow handling of entry-point-scoped
* facts
*/
-public interface WorkingMemoryEntryPoint extends org.kie.runtime.rule.WorkingMemoryEntryPoint {
+public interface WorkingMemoryEntryPoint extends org.kie.runtime.rule.SessionEntryPoint {
/**
* Assert a fact.
*
View
10 drools-core/src/main/java/org/drools/base/DefaultKnowledgeHelper.java
@@ -65,7 +65,7 @@
import org.kie.runtime.process.ProcessInstance;
import org.kie.runtime.process.WorkflowProcessInstance;
import org.kie.runtime.rule.Match;
-import org.kie.runtime.rule.WorkingMemoryEntryPoint;
+import org.kie.runtime.rule.SessionEntryPoint;
public class DefaultKnowledgeHelper
implements
@@ -420,7 +420,7 @@ public void halt() {
this.workingMemory.halt();
}
- public WorkingMemoryEntryPoint getEntryPoint(String id) {
+ public SessionEntryPoint getEntryPoint(String id) {
return this.workingMemory.getEntryPoints().get( id );
}
@@ -428,7 +428,7 @@ public Channel getChannel(String id) {
return this.workingMemory.getChannels().get( id );
}
- public Map<String, WorkingMemoryEntryPoint> getEntryPoints() {
+ public Map<String, SessionEntryPoint> getEntryPoints() {
return Collections.unmodifiableMap( this.workingMemory.getEntryPoints() );
}
@@ -454,7 +454,7 @@ private FactHandle getFactHandleFromWM(final Object object) {
FactHandle handle = null;
// entry point null means it is a generated fact, not a regular inserted fact
// NOTE: it would probably be a good idea to create a specific attribute for that
- for ( WorkingMemoryEntryPoint ep : workingMemory.getEntryPoints().values() ) {
+ for ( SessionEntryPoint ep : workingMemory.getEntryPoints().values() ) {
handle = (FactHandle) ep.getFactHandle( object );
if ( identityMap != null ) {
identityMap.put( object,
@@ -545,7 +545,7 @@ public RetractTrait(FactHandle fh) {
this.fh = fh;
}
- public void unMatch(org.kie.runtime.rule.WorkingMemory wm,
+ public void unMatch(org.kie.runtime.rule.Session wm,
Match activation) {
wm.retract( fh );
if ( next != null ) {
View
6 drools-core/src/main/java/org/drools/base/SequentialKnowledgeHelper.java
@@ -37,7 +37,7 @@
import org.kie.runtime.KieRuntime;
import org.kie.runtime.KnowledgeRuntime;
import org.kie.runtime.rule.Match;
-import org.kie.runtime.rule.WorkingMemoryEntryPoint;
+import org.kie.runtime.rule.SessionEntryPoint;
public class SequentialKnowledgeHelper
implements
@@ -142,7 +142,7 @@ public void halt() {
this.workingMemory.halt();
}
- public WorkingMemoryEntryPoint getEntryPoint(String id) {
+ public SessionEntryPoint getEntryPoint(String id) {
return this.workingMemory.getEntryPoints().get( id );
}
@@ -150,7 +150,7 @@ public Channel getChannel(String id) {
return this.workingMemory.getChannels().get( id );
}
- public Map<String, WorkingMemoryEntryPoint> getEntryPoints() {
+ public Map<String, SessionEntryPoint> getEntryPoints() {
return Collections.unmodifiableMap( this.workingMemory.getEntryPoints() );
}
View
6 drools-core/src/main/java/org/drools/command/ResolvingKnowledgeCommandContext.java
@@ -8,7 +8,7 @@
import org.kie.runtime.ExecutionResults;
import org.kie.runtime.StatefulKnowledgeSession;
import org.kie.runtime.process.WorkItemManager;
-import org.kie.runtime.rule.WorkingMemoryEntryPoint;
+import org.kie.runtime.rule.SessionEntryPoint;
public class ResolvingKnowledgeCommandContext implements KnowledgeCommandContext {
@@ -43,8 +43,8 @@ public ExecutionResults getExecutionResults() {
return ( ExecutionResults ) context.get( ExecutionResults.class.getName() );
}
- public WorkingMemoryEntryPoint getWorkingMemoryEntryPoint() {
- return ( WorkingMemoryEntryPoint ) context.get( WorkingMemoryEntryPoint.class.getName() );
+ public SessionEntryPoint getWorkingMemoryEntryPoint() {
+ return ( SessionEntryPoint ) context.get( SessionEntryPoint.class.getName() );
}
public World getContextManager() {
View
6 drools-core/src/main/java/org/drools/command/impl/CommandBasedStatefulKnowledgeSession.java
@@ -94,7 +94,7 @@
import org.kie.runtime.rule.QueryResults;
import org.kie.runtime.rule.RuleFlowGroup;
import org.kie.runtime.rule.ViewChangedEventListener;
-import org.kie.runtime.rule.WorkingMemoryEntryPoint;
+import org.kie.runtime.rule.SessionEntryPoint;
import org.kie.time.SessionClock;
public class CommandBasedStatefulKnowledgeSession
@@ -365,11 +365,11 @@ public FactHandle getFactHandle(Object object) {
return (T) this.commandService.execute( new GetSessionClockCommand() );
}
- public WorkingMemoryEntryPoint getWorkingMemoryEntryPoint(String name) {
+ public SessionEntryPoint getWorkingMemoryEntryPoint(String name) {
return this.commandService.execute( new GetWorkingMemoryEntryPointCommand( name ) );
}
- public Collection< ? extends WorkingMemoryEntryPoint> getWorkingMemoryEntryPoints() {
+ public Collection< ? extends SessionEntryPoint> getWorkingMemoryEntryPoints() {
return this.commandService.execute( new GetWorkingMemoryEntryPointsCommand() );
}
View
10 drools-core/src/main/java/org/drools/command/impl/FixedKnowledgeCommandContext.java
@@ -24,7 +24,7 @@
import org.kie.runtime.KieSession;
import org.kie.runtime.StatefulKnowledgeSession;
import org.kie.runtime.process.WorkItemManager;
-import org.kie.runtime.rule.WorkingMemoryEntryPoint;
+import org.kie.runtime.rule.SessionEntryPoint;
public class FixedKnowledgeCommandContext
implements
@@ -34,7 +34,7 @@
private KnowledgeBuilder kbuilder;
private KnowledgeBase kbase;
private StatefulKnowledgeSession statefulKsession;
- private WorkingMemoryEntryPoint workingMemoryEntryPoint;
+ private SessionEntryPoint workingMemoryEntryPoint;
private ExecutionResults kresults;
public FixedKnowledgeCommandContext(Context context,
@@ -53,7 +53,7 @@ public FixedKnowledgeCommandContext(Context context,
KnowledgeBuilder kbuilder,
KnowledgeBase kbase,
StatefulKnowledgeSession statefulKsession,
- WorkingMemoryEntryPoint workingMemoryEntryPoint,
+ SessionEntryPoint workingMemoryEntryPoint,
ExecutionResults kresults) {
this( context,
kbuilder,
@@ -83,11 +83,11 @@ public ExecutionResults getExecutionResults() {
return this.kresults;
}
- public WorkingMemoryEntryPoint getWorkingMemoryEntryPoint() {
+ public SessionEntryPoint getWorkingMemoryEntryPoint() {
return workingMemoryEntryPoint;
}
- public void setWorkingMemoryEntryPoint(WorkingMemoryEntryPoint workingMemoryEntryPoint) {
+ public void setWorkingMemoryEntryPoint(SessionEntryPoint workingMemoryEntryPoint) {
this.workingMemoryEntryPoint = workingMemoryEntryPoint;
}
View
4 drools-core/src/main/java/org/drools/command/impl/KnowledgeCommandContext.java
@@ -6,7 +6,7 @@
import org.kie.runtime.ExecutionResults;
import org.kie.runtime.StatefulKnowledgeSession;
import org.kie.runtime.process.WorkItemManager;
-import org.kie.runtime.rule.WorkingMemoryEntryPoint;
+import org.kie.runtime.rule.SessionEntryPoint;
public interface KnowledgeCommandContext extends Context {
@@ -22,6 +22,6 @@
public ExecutionResults getExecutionResults();
- public WorkingMemoryEntryPoint getWorkingMemoryEntryPoint();
+ public SessionEntryPoint getWorkingMemoryEntryPoint();
}
View
6 drools-core/src/main/java/org/drools/command/runtime/rule/GetWorkingMemoryEntryPointCommand.java
@@ -20,11 +20,11 @@
import org.drools.command.impl.KnowledgeCommandContext;
import org.kie.command.Context;
import org.kie.runtime.StatefulKnowledgeSession;
-import org.kie.runtime.rule.WorkingMemoryEntryPoint;
+import org.kie.runtime.rule.SessionEntryPoint;
public class GetWorkingMemoryEntryPointCommand
implements
- GenericCommand<WorkingMemoryEntryPoint> {
+ GenericCommand<SessionEntryPoint> {
private String name;
@@ -32,7 +32,7 @@ public GetWorkingMemoryEntryPointCommand(String name) {
this.name = name;
}
- public WorkingMemoryEntryPoint execute(Context context) {
+ public SessionEntryPoint execute(Context context) {
StatefulKnowledgeSession ksession = ((KnowledgeCommandContext) context).getStatefulKnowledgesession();
return ksession.getWorkingMemoryEntryPoint( name );
}
View
6 drools-core/src/main/java/org/drools/command/runtime/rule/GetWorkingMemoryEntryPointsCommand.java
@@ -22,16 +22,16 @@
import org.drools.command.impl.KnowledgeCommandContext;
import org.kie.command.Context;
import org.kie.runtime.StatefulKnowledgeSession;
-import org.kie.runtime.rule.WorkingMemoryEntryPoint;
+import org.kie.runtime.rule.SessionEntryPoint;
public class GetWorkingMemoryEntryPointsCommand
implements
- GenericCommand<Collection< ? extends WorkingMemoryEntryPoint>> {
+ GenericCommand<Collection< ? extends SessionEntryPoint>> {
public GetWorkingMemoryEntryPointsCommand() {
}
- public Collection< ? extends WorkingMemoryEntryPoint> execute(Context context) {
+ public Collection< ? extends SessionEntryPoint> execute(Context context) {
StatefulKnowledgeSession ksession = ((KnowledgeCommandContext) context).getStatefulKnowledgesession();
return ksession.getWorkingMemoryEntryPoints();
}
View
4 drools-core/src/main/java/org/drools/command/runtime/rule/InsertElementsCommand.java
@@ -35,7 +35,7 @@
import org.kie.command.Context;
import org.kie.runtime.StatefulKnowledgeSession;
import org.kie.runtime.rule.FactHandle;
-import org.kie.runtime.rule.WorkingMemoryEntryPoint;
+import org.kie.runtime.rule.SessionEntryPoint;
@XmlAccessorType( XmlAccessType.NONE )
public class InsertElementsCommand
@@ -82,7 +82,7 @@ public void setObjects(List<Object> objects) {
StatefulKnowledgeSession ksession = ((KnowledgeCommandContext) context).getStatefulKnowledgesession();
List<FactHandle> handles = new ArrayList<FactHandle>();
- WorkingMemoryEntryPoint wmep;
+ SessionEntryPoint wmep;
if ( StringUtils.isEmpty( this.entryPoint ) ) {
wmep = ksession;
} else {
View
4 drools-core/src/main/java/org/drools/command/runtime/rule/InsertObjectInEntryPointCommand.java
@@ -28,7 +28,7 @@
import org.drools.runtime.impl.ExecutionResultImpl;
import org.kie.command.Context;
import org.kie.runtime.rule.FactHandle;
-import org.kie.runtime.rule.WorkingMemoryEntryPoint;
+import org.kie.runtime.rule.SessionEntryPoint;
@XmlAccessorType(XmlAccessType.NONE)
public class InsertObjectInEntryPointCommand
@@ -57,7 +57,7 @@ public InsertObjectInEntryPointCommand(Object object, String outIdentifier) {
public FactHandle execute(Context context) {
- WorkingMemoryEntryPoint ep = ((KnowledgeCommandContext) context).getWorkingMemoryEntryPoint();
+ SessionEntryPoint ep = ((KnowledgeCommandContext) context).getWorkingMemoryEntryPoint();
FactHandle factHandle = ep.insert(object);
DefaultFactHandle disconnectedHandle = ((DefaultFactHandle) factHandle).clone();
View
4 drools-core/src/main/java/org/drools/command/runtime/rule/ModifyCommand.java
@@ -35,7 +35,7 @@
import org.kie.command.Setter;
import org.kie.runtime.StatefulKnowledgeSession;
import org.kie.runtime.rule.FactHandle;
-import org.kie.runtime.rule.WorkingMemoryEntryPoint;
+import org.kie.runtime.rule.SessionEntryPoint;
import org.mvel2.MVEL;
@XmlAccessorType(XmlAccessType.NONE)
@@ -68,7 +68,7 @@ public ModifyCommand(FactHandle handle,
public Object execute(Context context) {
StatefulKnowledgeSession ksession = ((KnowledgeCommandContext) context).getStatefulKnowledgesession();
- WorkingMemoryEntryPoint wmep = ksession.getWorkingMemoryEntryPoint( handle.getEntryPointId() );
+ SessionEntryPoint wmep = ksession.getWorkingMemoryEntryPoint( handle.getEntryPointId() );
Object object = wmep.getObject( this.handle );
MVEL.eval( getMvelExpr(),
View
8 drools-core/src/main/java/org/drools/common/AbstractFactHandleFactory.java
@@ -21,7 +21,7 @@
import org.drools.reteoo.ObjectTypeConf;
import org.drools.spi.FactHandleFactory;
-import org.kie.runtime.rule.WorkingMemoryEntryPoint;
+import org.kie.runtime.rule.SessionEntryPoint;
public abstract class AbstractFactHandleFactory
implements
@@ -49,7 +49,7 @@ public AbstractFactHandleFactory(int id, long counter) {
public final InternalFactHandle newFactHandle(final Object object,
final ObjectTypeConf conf,
final InternalWorkingMemory workingMemory,
- final WorkingMemoryEntryPoint wmEntryPoint) {
+ final SessionEntryPoint wmEntryPoint) {
return newFactHandle( this.id.incrementAndGet(),
object,
conf,
@@ -64,7 +64,7 @@ public final InternalFactHandle newFactHandle(final int id,
final Object object,
final ObjectTypeConf conf,
final InternalWorkingMemory workingMemory,
- final WorkingMemoryEntryPoint wmEntryPoint) {
+ final SessionEntryPoint wmEntryPoint) {
return newFactHandle( id,
object,
this.counter.incrementAndGet(),
@@ -81,7 +81,7 @@ public abstract InternalFactHandle newFactHandle(final int id,
final long recency,
final ObjectTypeConf conf,
final InternalWorkingMemory workingMemory,
- final WorkingMemoryEntryPoint wmEntryPoint);
+ final SessionEntryPoint wmEntryPoint);
/* (non-Javadoc)
* @see org.kie.reteoo.FactHandleFactory#increaseFactHandleRecency(org.drools.FactHandle)
View
12 drools-core/src/main/java/org/drools/common/DefaultFactHandle.java
@@ -35,7 +35,7 @@
import org.drools.reteoo.RightTuple;
import org.drools.spi.RuleComponent;
import org.kie.definition.rule.Rule;
-import org.kie.runtime.rule.WorkingMemoryEntryPoint;
+import org.kie.runtime.rule.SessionEntryPoint;
/**
* Implementation of <code>FactHandle</code>.
@@ -65,7 +65,7 @@
private LeftTuple firstLeftTuple;
private LeftTuple lastLeftTuple;
- private WorkingMemoryEntryPoint entryPoint;
+ private SessionEntryPoint entryPoint;
private boolean disconnected;
@@ -94,7 +94,7 @@ public DefaultFactHandle(final int id,
public DefaultFactHandle(final int id,
final Object object,
final long recency,
- final WorkingMemoryEntryPoint wmEntryPoint) {
+ final SessionEntryPoint wmEntryPoint) {
this( id, determineIdentityHashCode( object ), object, recency, wmEntryPoint );
}
@@ -102,7 +102,7 @@ public DefaultFactHandle(final int id,
final int identityHashCode,
final Object object,
final long recency,
- final WorkingMemoryEntryPoint wmEntryPoint) {
+ final SessionEntryPoint wmEntryPoint) {
this.id = id;
this.entryPoint = wmEntryPoint;
this.recency = recency;
@@ -307,11 +307,11 @@ public LeftTuple getLastLeftTuple() {
return this.lastLeftTuple;
}
- public WorkingMemoryEntryPoint getEntryPoint() {
+ public SessionEntryPoint getEntryPoint() {
return entryPoint;
}
- public void setEntryPoint( WorkingMemoryEntryPoint sourceNode ) {
+ public void setEntryPoint( SessionEntryPoint sourceNode ) {
this.entryPoint = sourceNode;
}
View
6 drools-core/src/main/java/org/drools/common/DisconnectedFactHandle.java
@@ -12,7 +12,7 @@
import org.drools.reteoo.LeftTuple;
import org.drools.reteoo.RightTuple;
import org.kie.runtime.rule.FactHandle;
-import org.kie.runtime.rule.WorkingMemoryEntryPoint;
+import org.kie.runtime.rule.SessionEntryPoint;
@XmlAccessorType(XmlAccessType.NONE)
public class DisconnectedFactHandle
@@ -113,7 +113,7 @@ public Object getObject() {
throw new UnsupportedOperationException( "DisonnectedFactHandle does not support this method" );
}
- public WorkingMemoryEntryPoint getEntryPoint() {
+ public SessionEntryPoint getEntryPoint() {
throw new UnsupportedOperationException( "DisonnectedFactHandle does not support this method" );
}
@@ -137,7 +137,7 @@ public boolean isValid() {
throw new UnsupportedOperationException( "DisonnectedFactHandle does not support this method" );
}
- public void setEntryPoint(WorkingMemoryEntryPoint ep) {
+ public void setEntryPoint(SessionEntryPoint ep) {
throw new UnsupportedOperationException( "DisonnectedFactHandle does not support this method" );
}
View
4 drools-core/src/main/java/org/drools/common/DisconnectedWorkingMemoryEntryPoint.java
@@ -5,9 +5,9 @@
import org.kie.runtime.ObjectFilter;
import org.kie.runtime.rule.FactHandle;
-import org.kie.runtime.rule.WorkingMemoryEntryPoint;
+import org.kie.runtime.rule.SessionEntryPoint;
-public class DisconnectedWorkingMemoryEntryPoint implements WorkingMemoryEntryPoint, Serializable {
+public class DisconnectedWorkingMemoryEntryPoint implements SessionEntryPoint, Serializable {
private String id;
View
4 drools-core/src/main/java/org/drools/common/EventFactHandle.java
@@ -18,7 +18,7 @@
import org.drools.FactHandle;
import org.drools.reteoo.WindowTupleList;
-import org.kie.runtime.rule.WorkingMemoryEntryPoint;
+import org.kie.runtime.rule.SessionEntryPoint;
public class EventFactHandle extends DefaultFactHandle implements Comparable<EventFactHandle> {
@@ -56,7 +56,7 @@ public EventFactHandle(final int id,
final long recency,
final long timestamp,
final long duration,
- final WorkingMemoryEntryPoint wmEntryPoint) {
+ final SessionEntryPoint wmEntryPoint) {
super( id,
object,
recency,
View
6 drools-core/src/main/java/org/drools/common/InternalFactHandle.java
@@ -19,7 +19,7 @@
import org.drools.FactHandle;
import org.drools.reteoo.LeftTuple;
import org.drools.reteoo.RightTuple;
-import org.kie.runtime.rule.WorkingMemoryEntryPoint;
+import org.kie.runtime.rule.SessionEntryPoint;
public interface InternalFactHandle
extends
@@ -65,9 +65,9 @@
public LeftTuple getLastLeftTuple();
- public WorkingMemoryEntryPoint getEntryPoint();
+ public SessionEntryPoint getEntryPoint();
- public void setEntryPoint( WorkingMemoryEntryPoint ep );
+ public void setEntryPoint( SessionEntryPoint ep );
public InternalFactHandle clone();
View
4 drools-core/src/main/java/org/drools/common/InternalWorkingMemory.java
@@ -38,7 +38,7 @@
import org.drools.type.DateFormats;
import org.kie.runtime.Calendars;
import org.kie.runtime.Channel;
-import org.kie.runtime.rule.WorkingMemoryEntryPoint;
+import org.kie.runtime.rule.SessionEntryPoint;
public interface InternalWorkingMemory
extends
@@ -127,7 +127,7 @@ void delete(final FactHandle factHandle,
*/
public Map< String, Channel> getChannels();
- public Map<String, ? extends WorkingMemoryEntryPoint> getEntryPoints();
+ public Map<String, ? extends SessionEntryPoint> getEntryPoints();
public SessionConfiguration getSessionConfiguration();
View
4 drools-core/src/main/java/org/drools/common/InternalWorkingMemoryEntryPoint.java
@@ -25,9 +25,9 @@
import org.drools.spi.Activation;
-import org.kie.runtime.rule.WorkingMemoryEntryPoint;
+import org.kie.runtime.rule.SessionEntryPoint;
-public interface InternalWorkingMemoryEntryPoint extends WorkingMemoryEntryPoint {
+public interface InternalWorkingMemoryEntryPoint extends SessionEntryPoint {
ObjectTypeConfigurationRegistry getObjectTypeConfigurationRegistry();
RuleBase getRuleBase();
public void delete(final FactHandle factHandle,
View
6 drools-core/src/main/java/org/drools/common/QueryElementFactHandle.java
@@ -24,7 +24,7 @@
import org.drools.reteoo.LeftTuple;
import org.drools.reteoo.RightTuple;
-import org.kie.runtime.rule.WorkingMemoryEntryPoint;
+import org.kie.runtime.rule.SessionEntryPoint;
@XmlAccessorType(XmlAccessType.NONE)
public class QueryElementFactHandle
@@ -79,7 +79,7 @@ public void setObject(Object object) {
this.object = object;
}
- public WorkingMemoryEntryPoint getEntryPoint() {
+ public SessionEntryPoint getEntryPoint() {
return null;
//throw new UnsupportedOperationException( "DisonnectedFactHandle does not support this method" );
}
@@ -104,7 +104,7 @@ public boolean isValid() {
return true;
}
- public void setEntryPoint(WorkingMemoryEntryPoint ep) {
+ public void setEntryPoint(SessionEntryPoint ep) {
throw new UnsupportedOperationException( "QueryElementFactHandle does not support this method" );
}
View
6 drools-core/src/main/java/org/drools/impl/StatefulKnowledgeSessionImpl.java
@@ -96,7 +96,7 @@
import org.kie.runtime.rule.LiveQuery;
import org.kie.runtime.rule.QueryResults;
import org.kie.runtime.rule.ViewChangedEventListener;
-import org.kie.runtime.rule.WorkingMemoryEntryPoint;
+import org.kie.runtime.rule.SessionEntryPoint;
import org.kie.time.SessionClock;
public class StatefulKnowledgeSessionImpl
@@ -137,11 +137,11 @@ public int getId() {
return this.session.getId();
}
- public WorkingMemoryEntryPoint getWorkingMemoryEntryPoint(String name) {
+ public SessionEntryPoint getWorkingMemoryEntryPoint(String name) {
return session.getWorkingMemoryEntryPoint( name );
}
- public Collection< ? extends org.kie.runtime.rule.WorkingMemoryEntryPoint> getWorkingMemoryEntryPoints() {
+ public Collection< ? extends org.kie.runtime.rule.SessionEntryPoint> getWorkingMemoryEntryPoints() {
return session.getWorkingMemoryEntryPoints();
}
View
6 drools-core/src/main/java/org/drools/marshalling/impl/InputMarshaller.java
@@ -100,7 +100,7 @@
import org.drools.time.impl.PseudoClockScheduler;
import org.kie.marshalling.ObjectMarshallingStrategy;
import org.kie.runtime.Environment;
-import org.kie.runtime.rule.WorkingMemoryEntryPoint;
+import org.kie.runtime.rule.SessionEntryPoint;
public class InputMarshaller {
@@ -272,7 +272,7 @@ public static ReteooStatefulSession readSession( ReteooStatefulSession session,
}
while ( context.readShort() == PersisterEnums.ENTRY_POINT) {
String entryPointId = context.stream.readUTF();
- WorkingMemoryEntryPoint wmep = context.wm.getEntryPoints().get( entryPointId );
+ SessionEntryPoint wmep = context.wm.getEntryPoints().get( entryPointId );
readFactHandles( context,
( (NamedEntryPoint) wmep ).getObjectStore() );
}
@@ -501,7 +501,7 @@ else if (strategyIndex == -2) {
object = strategy.read( context.stream );
}
- WorkingMemoryEntryPoint entryPoint = null;
+ SessionEntryPoint entryPoint = null;
if (context.readBoolean()) {
String entryPointId = context.readUTF();
if (entryPointId != null && !entryPointId.equals( "" )) {
View
4 drools-core/src/main/java/org/drools/marshalling/impl/OutputMarshaller.java
@@ -90,7 +90,7 @@
import org.drools.time.impl.TimerJobInstance;
import org.kie.marshalling.ObjectMarshallingStrategy;
import org.kie.marshalling.ObjectMarshallingStrategyStore;
-import org.kie.runtime.rule.WorkingMemoryEntryPoint;
+import org.kie.runtime.rule.SessionEntryPoint;
public class OutputMarshaller {
@@ -134,7 +134,7 @@ public static void writeSession(MarshallerWriteContext context) throws IOExcepti
writeInitialFactHandleRightTuples( context );
- for ( WorkingMemoryEntryPoint wmep : wm.getEntryPoints().values() ) {
+ for ( SessionEntryPoint wmep : wm.getEntryPoints().values() ) {
context.stream.writeShort( PersisterEnums.ENTRY_POINT );
context.stream.writeUTF( wmep.getEntryPointId() );
writeFactHandles( context, (( NamedEntryPoint )wmep).getObjectStore() );
View
10 drools-core/src/main/java/org/drools/marshalling/impl/ProtobufInputMarshaller.java
@@ -69,7 +69,7 @@
import org.kie.marshalling.ObjectMarshallingStrategy;
import org.kie.runtime.Environment;
import org.kie.runtime.EnvironmentName;
-import org.kie.runtime.rule.WorkingMemoryEntryPoint;
+import org.kie.runtime.rule.SessionEntryPoint;
import com.google.protobuf.ExtensionRegistry;
@@ -245,7 +245,7 @@ public static ReteooStatefulSession readSession(ProtobufMessages.KnowledgeSessio
_session.getRuleData() );
for ( ProtobufMessages.EntryPoint _ep : _session.getRuleData().getEntryPointList() ) {
- WorkingMemoryEntryPoint wmep = context.wm.getEntryPoints().get( _ep.getEntryPointId() );
+ SessionEntryPoint wmep = context.wm.getEntryPoints().get( _ep.getEntryPointId() );
readFactHandles( context,
_ep,
((NamedEntryPoint) wmep).getObjectStore() );
@@ -425,7 +425,7 @@ public static void readFactHandles(MarshallerReaderContext context,
ClassNotFoundException {
InternalWorkingMemory wm = context.wm;
- WorkingMemoryEntryPoint entryPoint = context.wm.getEntryPoints().get( _ep.getEntryPointId() );
+ SessionEntryPoint entryPoint = context.wm.getEntryPoints().get( _ep.getEntryPointId() );
// load the handles
for ( ProtobufMessages.FactHandle _handle : _ep.getHandleList() ) {
InternalFactHandle handle = readFactHandle( context,
@@ -478,7 +478,7 @@ private static void assertHandleIntoOTN(MarshallerReaderContext context,
}
public static InternalFactHandle readFactHandle(MarshallerReaderContext context,
- WorkingMemoryEntryPoint entryPoint,
+ SessionEntryPoint entryPoint,
FactHandle _handle) throws IOException,
ClassNotFoundException {
Object object = null;
@@ -526,7 +526,7 @@ public static InternalFactHandle readFactHandle(MarshallerReaderContext context,
}
public static void readTruthMaintenanceSystem( MarshallerReaderContext context,
- WorkingMemoryEntryPoint wmep,
+ SessionEntryPoint wmep,
ProtobufMessages.EntryPoint _ep ) throws IOException, ClassNotFoundException {
TruthMaintenanceSystem tms = ((NamedEntryPoint) wmep).getTruthMaintenanceSystem();
View
6 drools-core/src/main/java/org/drools/marshalling/impl/ProtobufOutputMarshaller.java
@@ -78,7 +78,7 @@
import org.drools.time.impl.TimerJobInstance;
import org.kie.marshalling.ObjectMarshallingStrategy;
import org.kie.marshalling.ObjectMarshallingStrategyStore;
-import org.kie.runtime.rule.WorkingMemoryEntryPoint;
+import org.kie.runtime.rule.SessionEntryPoint;
import com.google.protobuf.ByteString;
@@ -133,7 +133,7 @@ public static void writeSession(MarshallerWriteContext context) throws IOExcepti
writeNodeMemories( context, _ruleData );
- for ( WorkingMemoryEntryPoint wmep : wm.getEntryPoints().values() ) {
+ for ( SessionEntryPoint wmep : wm.getEntryPoints().values() ) {
org.drools.marshalling.impl.ProtobufMessages.EntryPoint.Builder _epb = ProtobufMessages.EntryPoint.newBuilder();
_epb.setEntryPointId( wmep.getEntryPointId() );
writeFactHandles( context,
@@ -456,7 +456,7 @@ public static void writeActionQueue(MarshallerWriteContext context,
}
public static void writeTruthMaintenanceSystem(MarshallerWriteContext context,
- WorkingMemoryEntryPoint wmep,
+ SessionEntryPoint wmep,
ProtobufMessages.EntryPoint.Builder _epb) throws IOException {
TruthMaintenanceSystem tms = ((NamedEntryPoint) wmep).getTruthMaintenanceSystem();
ObjectHashMap justifiedMap = tms.getEqualityKeyMap();
View
6 drools-core/src/main/java/org/drools/reteoo/DisposedReteooWorkingMemory.java
@@ -65,7 +65,7 @@
import org.kie.runtime.process.WorkItemManager;
import org.kie.runtime.rule.LiveQuery;
import org.kie.runtime.rule.ViewChangedEventListener;
-import org.kie.runtime.rule.WorkingMemoryEntryPoint;
+import org.kie.runtime.rule.SessionEntryPoint;
import org.kie.time.SessionClock;
@SuppressWarnings( "deprecation" )
@@ -200,7 +200,7 @@ public InternalKnowledgeRuntime getKnowledgeRuntime() {
throw new IllegalStateException( ERRORMSG );
}
- public Map<String, ? extends WorkingMemoryEntryPoint> getEntryPoints() {
+ public Map<String, ? extends SessionEntryPoint> getEntryPoints() {
throw new IllegalStateException( ERRORMSG );
}
@@ -504,7 +504,7 @@ public void removeEventListener( ProcessEventListener listener ) {
throw new IllegalStateException( ERRORMSG );
}
- public Collection<? extends WorkingMemoryEntryPoint> getWorkingMemoryEntryPoints() {
+ public Collection<? extends SessionEntryPoint> getWorkingMemoryEntryPoints() {
throw new IllegalStateException( ERRORMSG );
}
View
4 drools-core/src/main/java/org/drools/reteoo/ReteooFactHandleFactory.java
@@ -26,7 +26,7 @@
import org.drools.common.InternalWorkingMemory;
import org.drools.rule.TypeDeclaration;
import org.drools.spi.FactHandleFactory;
-import org.kie.runtime.rule.WorkingMemoryEntryPoint;
+import org.kie.runtime.rule.SessionEntryPoint;
public class ReteooFactHandleFactory extends AbstractFactHandleFactory implements Serializable {
@@ -50,7 +50,7 @@ public InternalFactHandle newFactHandle( final int id,
final long recency,
final ObjectTypeConf conf,
final InternalWorkingMemory workingMemory,
- final WorkingMemoryEntryPoint wmEntryPoint) {
+ final SessionEntryPoint wmEntryPoint) {
if ( conf != null && conf.isEvent() ) {
TypeDeclaration type = conf.getTypeDeclaration();
long timestamp;
View
4 drools-core/src/main/java/org/drools/reteoo/ReteooWorkingMemoryInterface.java
@@ -14,7 +14,7 @@
import org.kie.runtime.process.ProcessInstance;
import org.kie.runtime.rule.LiveQuery;
import org.kie.runtime.rule.ViewChangedEventListener;
-import org.kie.runtime.rule.WorkingMemoryEntryPoint;
+import org.kie.runtime.rule.SessionEntryPoint;
/**
* This is an interface for ReteooWorkingMemory implementations
@@ -25,7 +25,7 @@
EventSupport,
ProcessEventManager {
- Collection<? extends WorkingMemoryEntryPoint> getWorkingMemoryEntryPoints();
+ Collection<? extends SessionEntryPoint> getWorkingMemoryEntryPoints();
void fireUntilHalt();
View
4 drools-core/src/main/java/org/drools/runtime/rule/impl/DefaultConsequenceExceptionHandler.java
@@ -23,7 +23,7 @@
import org.kie.runtime.rule.ConsequenceExceptionHandler;
import org.kie.runtime.rule.Match;
-import org.kie.runtime.rule.WorkingMemory;
+import org.kie.runtime.rule.Session;
public class DefaultConsequenceExceptionHandler implements ConsequenceExceptionHandler, Externalizable {
@@ -34,7 +34,7 @@ public void writeExternal(ObjectOutput out) throws IOException {
}
public void handleException(Match activation,
- WorkingMemory workingMemory,
+ Session workingMemory,
Exception exception) {
throw new org.kie.runtime.rule.ConsequenceException(exception, workingMemory, activation );
}
View
6 drools-core/src/main/java/org/drools/spi/FactHandleFactory.java
@@ -23,7 +23,7 @@
import org.drools.common.InternalFactHandle;
import org.drools.common.InternalWorkingMemory;
import org.drools.reteoo.ObjectTypeConf;
-import org.kie.runtime.rule.WorkingMemoryEntryPoint;
+import org.kie.runtime.rule.SessionEntryPoint;
/**
* Factory Interface to return new <code>FactHandle</code>s
@@ -39,14 +39,14 @@
public InternalFactHandle newFactHandle(Object object,
ObjectTypeConf conf,
InternalWorkingMemory workingMemory,
- WorkingMemoryEntryPoint wmEntryPoint );
+ SessionEntryPoint wmEntryPoint );
public InternalFactHandle newFactHandle(final int id,
final Object object,
final long recency,
final ObjectTypeConf conf,
final InternalWorkingMemory workingMemory,
- final WorkingMemoryEntryPoint wmEntryPoint);
+ final SessionEntryPoint wmEntryPoint);
/**
* Increases the recency of the FactHandle
View
6 drools-core/src/main/java/org/drools/spi/KnowledgeHelper.java
@@ -28,7 +28,7 @@
import org.drools.rule.Rule;
import org.kie.runtime.Channel;
import org.kie.runtime.rule.RuleContext;
-import org.kie.runtime.rule.WorkingMemoryEntryPoint;
+import org.kie.runtime.rule.SessionEntryPoint;
/**
* KnowledgeHelper implementation types are injected into consequenses
@@ -114,9 +114,9 @@ public void insertLogical(Object object,
WorkingMemory getWorkingMemory();
- WorkingMemoryEntryPoint getEntryPoint( String id );
+ SessionEntryPoint getEntryPoint( String id );
- Map<String, WorkingMemoryEntryPoint> getEntryPoints();
+ Map<String, SessionEntryPoint> getEntryPoints();
Channel getChannel( String id );
View
2  drools-core/src/test/java/org/drools/reteoo/AgendaTest.java
@@ -230,7 +230,7 @@ public void evaluate(final KnowledgeHelper knowledgeHelper,
item.setActivationUnMatchListener( new ActivationUnMatchListener() {
- public void unMatch(org.kie.runtime.rule.WorkingMemory wm,
+ public void unMatch(org.kie.runtime.rule.Session wm,
Match activation) {
cheese.setPrice( oldPrice );
}
View
4 drools-core/src/test/java/org/drools/reteoo/ReteooWorkingMemoryTest.java
@@ -30,7 +30,7 @@
import org.kie.KnowledgeBase;
import org.kie.KnowledgeBaseFactory;
import org.kie.runtime.StatefulKnowledgeSession;
-import org.kie.runtime.rule.WorkingMemoryEntryPoint;
+import org.kie.runtime.rule.SessionEntryPoint;
import static org.junit.Assert.*;
@@ -193,7 +193,7 @@ public void testDifferentEntryPointsOnSameFact() {
StatefulKnowledgeSession ksession = kbase.newStatefulKnowledgeSession();
org.kie.runtime.rule.FactHandle f1 = ksession.insert( "f1" );
- WorkingMemoryEntryPoint ep = ksession.getWorkingMemoryEntryPoint( "xxx" );
+ SessionEntryPoint ep = ksession.getWorkingMemoryEntryPoint( "xxx" );
try {
ep.update( f1, "s1" );
fail( "Should throw an exception" );
View
4 drools-examples/src/main/java/org/drools/benchmark/waltz/WaltzBenchmark.java
@@ -24,7 +24,7 @@
import org.kie.io.ResourceFactory;
import org.kie.io.ResourceType;
import org.kie.runtime.StatefulKnowledgeSession;
-import org.kie.runtime.rule.WorkingMemory;
+import org.kie.runtime.rule.Session;
import java.io.BufferedReader;
import java.io.IOException;
@@ -78,7 +78,7 @@ public static void main(final String[] args) {
System.out.println( "average : " + totalTime / 5 );
}
- private static void loadLines(WorkingMemory wm,
+ private static void loadLines(Session wm,
String filename) {
try {
BufferedReader reader = new BufferedReader( new InputStreamReader( WaltzBenchmark.class.getResourceAsStream( "data/" + filename ) ) );
View
10 drools-examples/src/main/java/org/drools/games/pong/PongUI.java
@@ -13,7 +13,7 @@
import org.kie.runtime.StatefulKnowledgeSession;
import org.kie.runtime.rule.FactHandle;
-import org.kie.runtime.rule.WorkingMemoryEntryPoint;
+import org.kie.runtime.rule.SessionEntryPoint;
public class PongUI {
private PongConfiguration pconf;
@@ -100,11 +100,11 @@ public void init(StatefulKnowledgeSession ksession) {
public static class PongKeyListener implements KeyListener {
- WorkingMemoryEntryPoint keyPressedEntryPoint;
- WorkingMemoryEntryPoint keyReleasedEntryPoint;
+ SessionEntryPoint keyPressedEntryPoint;
+ SessionEntryPoint keyReleasedEntryPoint;
- public PongKeyListener(WorkingMemoryEntryPoint keyPressedEntryPoint,
- WorkingMemoryEntryPoint keyReleasedEntryPoint) {
+ public PongKeyListener(SessionEntryPoint keyPressedEntryPoint,
+ SessionEntryPoint keyReleasedEntryPoint) {
this.keyPressedEntryPoint = keyPressedEntryPoint;
this.keyReleasedEntryPoint = keyReleasedEntryPoint;
}
View
4 drools-jsr94/src/main/java/org/drools/jsr94/rules/Jsr94EventFactHandle.java
@@ -43,7 +43,7 @@
import javax.rules.Handle;
import org.drools.common.EventFactHandle;
-import org.kie.runtime.rule.WorkingMemoryEntryPoint;
+import org.kie.runtime.rule.SessionEntryPoint;
/**
* The Drools implementation of the <code>Handle</code> interface which provides
@@ -78,7 +78,7 @@ public Jsr94EventFactHandle(final long id,
final long recency,
final long timestamp,
final long duration,
- final WorkingMemoryEntryPoint entryPoint) {
+ final SessionEntryPoint entryPoint) {
super( (int) id,
object,
recency,
View
4 drools-jsr94/src/main/java/org/drools/jsr94/rules/Jsr94FactHandle.java
@@ -43,7 +43,7 @@
import javax.rules.Handle;
import org.drools.common.DefaultFactHandle;
-import org.kie.runtime.rule.WorkingMemoryEntryPoint;
+import org.kie.runtime.rule.SessionEntryPoint;
/**
* The Drools implementation of the <code>Handle</code> interface which provides
@@ -77,7 +77,7 @@
Jsr94FactHandle(final long id,
final Object object,
final long recency,
- final WorkingMemoryEntryPoint entryPoint) {
+ final SessionEntryPoint entryPoint) {
super( (int) id,
object,
recency,
View
4 drools-jsr94/src/main/java/org/drools/jsr94/rules/Jsr94FactHandleFactory.java
@@ -22,7 +22,7 @@
import org.drools.reteoo.ObjectTypeConf;
import org.drools.rule.TypeDeclaration;
import org.drools.spi.FactHandleFactory;
-import org.kie.runtime.rule.WorkingMemoryEntryPoint;
+import org.kie.runtime.rule.SessionEntryPoint;
/**
* A factory for creating <code>Handle</code>s.
@@ -36,7 +36,7 @@ public final InternalFactHandle newFactHandle(final int id,
final long recency,
final ObjectTypeConf conf,
final InternalWorkingMemory workingMemory,
- final WorkingMemoryEntryPoint entryPoint) {
+ final SessionEntryPoint entryPoint) {
if ( conf != null && conf.isEvent() ) {
// later we need to centralize the following code snippet in a common method
// shared by all fact handle factory implementations
Please sign in to comment.
Something went wrong with that request. Please try again.