public EqualityKey(final InternalFactHandle handle, final int status) { this.handle = handle; this.hashCode = handle.getObjectHashCode(); this.status = status; }
public EqualityKey(final InternalFactHandle handle) { this.handle = handle; this.hashCode = handle.getObjectHashCode(); }
public int hashCodeOf(final Object obj) { if ( obj instanceof FactHandle ) { return AbstractHashTable.rehash( ((InternalFactHandle) obj).getObjectHashCode() ); } return AbstractHashTable.rehash( obj.hashCode() ); }
public static DisconnectedFactHandle newFrom( FactHandle handle ) { if( handle instanceof DisconnectedFactHandle ) { return (DisconnectedFactHandle) handle; } else { InternalFactHandle ifh = (InternalFactHandle) handle; return new DisconnectedFactHandle(ifh.getId(), ifh.getIdentityHashCode(), ifh.getObjectHashCode(), ifh.getRecency(), ifh.getEntryPoint() != null ? ifh.getEntryPoint().getEntryPointId() : null, null, ifh.isValid(), ifh.isTraitOrTraitable() ); } }
public void rowAdded(final Rule rule, final LeftTuple tuple, final PropagationContext context, final InternalWorkingMemory workingMemory) { InternalFactHandle[] handles = new InternalFactHandle[tuple.getIndex() + 1]; LeftTuple entry = tuple; // Add all the FactHandles while ( entry != null) { InternalFactHandle handle = entry.getLastHandle(); handles[entry.getIndex()] = new DefaultFactHandle( handle.getId(), ( handle.getEntryPoint() != null ) ? handle.getEntryPoint().getEntryPointId() : null, handle.getIdentityHashCode(), handle.getObjectHashCode(), handle.getRecency(), handle.getObject() ); entry = entry.getParent(); } QueryTerminalNode node = ( QueryTerminalNode ) tuple.getLeftTupleSink(); this.results.add( new QueryRowWithSubruleIndex(handles, node.getSubruleIndex()) ); }