File tree 2 files changed +49
-0
lines changed
drools-api/src/main/java/org/drools
2 files changed +49
-0
lines changed Original file line number Diff line number Diff line change 1
1
package org .drools ;
2
2
3
+ import org .drools .time .SessionClock ;
4
+
3
5
public interface StatefulRuleSession {
4
6
FactHandle insertObject (Object object );
5
7
void retractObject (FactHandle factHandle );
6
8
void updateObject (FactHandle factHandle );
7
9
void updateObject (FactHandle factHandle , Object object );
8
10
9
11
void fireAllRules ();
12
+
13
+ void halt ();
14
+
15
+ /**
16
+ * Returns the session clock instance associated with this session
17
+ * @return
18
+ */
19
+ public SessionClock getSessionClock ();
10
20
}
Original file line number Diff line number Diff line change
1
+ /*
2
+ * Copyright 2007 JBoss Inc
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ *
16
+ * Created on Oct 17, 2007
17
+ */
18
+ package org .drools .time ;
19
+
20
+
21
+ /**
22
+ * A clock interface that all engine clocks must implement
23
+ *
24
+ */
25
+ public interface SessionClock {
26
+
27
+ /**
28
+ * Returns the current time. There is no semantics attached
29
+ * to the long return value, so it will depend on the actual
30
+ * implementation. For isntance, for a real clock it may be
31
+ * milliseconds.
32
+ *
33
+ * @return The current time. The unit of the time, depends on
34
+ * the actual clock implementation.
35
+ *
36
+ */
37
+ public long getCurrentTime ();
38
+
39
+ }
You can’t perform that action at this time.
0 commit comments