[jboss-svn-commits] JBL Code SVN: r20078 - labs/jbossrules/trunk/drools-jsr94/src/main/java/org/drools/jsr94/rules.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Tue May 20 06:13:15 EDT 2008
Author: mark.proctor at jboss.com
Date: 2008-05-20 06:13:14 -0400 (Tue, 20 May 2008)
New Revision: 20078
Modified:
labs/jbossrules/trunk/drools-jsr94/src/main/java/org/drools/jsr94/rules/Jsr94FactHandleFactory.java
Log:
JBRULES-1598 Efficient WorkingMemory serialization with binary protocol
-added missing Marshaller method to JSR94 fact handle factory
Modified: labs/jbossrules/trunk/drools-jsr94/src/main/java/org/drools/jsr94/rules/Jsr94FactHandleFactory.java
===================================================================
--- labs/jbossrules/trunk/drools-jsr94/src/main/java/org/drools/jsr94/rules/Jsr94FactHandleFactory.java 2008-05-20 10:01:32 UTC (rev 20077)
+++ labs/jbossrules/trunk/drools-jsr94/src/main/java/org/drools/jsr94/rules/Jsr94FactHandleFactory.java 2008-05-20 10:13:14 UTC (rev 20078)
@@ -31,42 +31,51 @@
*/
public final class Jsr94FactHandleFactory extends AbstractFactHandleFactory {
- private static final long serialVersionUID = 4964273923122006124L;
+ private static final long serialVersionUID = 4964273923122006124L;
- protected final InternalFactHandle newFactHandle(final int id,
- final Object object, final long recency, final ObjectTypeConf conf,
- final InternalWorkingMemory workingMemory) {
+ protected final InternalFactHandle newFactHandle(final int id,
+ final Object object,
+ final long recency,
+ final ObjectTypeConf conf,
+ final InternalWorkingMemory workingMemory) {
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
TypeDeclaration type = conf.getTypeDeclaration();
long timestamp = ((TemporalSession) workingMemory).getSessionClock().getCurrentTime();
long duration = 0;
- if( type.getDurationExtractor() != null ) {
- duration = type.getDurationExtractor().getLongValue( workingMemory, object );
+ if ( type.getDurationExtractor() != null ) {
+ duration = type.getDurationExtractor().getLongValue( workingMemory,
+ object );
}
return new Jsr94EventFactHandle( id,
- object,
- recency,
- timestamp,
- duration );
+ object,
+ recency,
+ timestamp,
+ duration );
} else {
return new Jsr94FactHandle( id,
- object,
- recency );
+ object,
+ recency );
}
- }
+ }
- /*
- * (non-Javadoc)
- *
- * @see org.drools.reteoo.FactHandleFactory#newInstance()
- */
- public FactHandleFactory newInstance() {
- return new Jsr94FactHandleFactory();
- }
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.drools.reteoo.FactHandleFactory#newInstance()
+ */
+ public FactHandleFactory newInstance() {
+ return new Jsr94FactHandleFactory();
+ }
- public Class getFactHandleType() {
- return Jsr94FactHandle.class;
- }
+ public Class getFactHandleType() {
+ return Jsr94FactHandle.class;
+ }
+
+ public FactHandleFactory newInstance(int id,
+ long counter) {
+ // TODO Auto-generated method stub
+ return null;
+ }
}
More information about the jboss-svn-commits
mailing list