public EqualityKey remove(final EqualityKey key) { return (EqualityKey) this.assertMap.remove( key ); }
/** * Retract the <code>FactHandle</code> from the <code>WindowNode</code>. * This method is for the node benefit only as the node itself will not * propagate retracts down the network, relying on the standard Rete * retract algorithm implemented by the ObjectTypeNode to do it. * * @param factHandle The fact handle. * @param context The propagation context * @param workingMemory The working memory session. */ public void retractObject(final InternalFactHandle factHandle, final PropagationContext context, final InternalWorkingMemory workingMemory) { final WindowMemory memory = (WindowMemory) workingMemory.getNodeMemory(this); // must guarantee single thread from now on memory.gate.lock(); try { // behavior retract behavior.retractFact(memory, factHandle, workingMemory); // memory retract memory.events.remove(factHandle); // as noted in the javadoc, this node will not propagate retracts, relying // on the standard algorithm to do it instead. } finally { memory.gate.unlock(); } }
public void updateHandle(InternalFactHandle handle, Object object){ this.assertMap.remove( handle ); Object oldObject = handle.getObject(); handle.setObject( object ); this.assertMap.put( handle, handle, false ); }
/** * The FactHandle is being removed from the system so remove any logical dependencies * between the justified FactHandle and its justifiers. Removes the FactHandle key * from the justifiedMap. It then iterates over all the LogicalDependency nodes, if any, * in the returned Set and removes the LogicalDependency node from the LinkedList maintained * by the Activation. * * @see LogicalDependency * * @param handle - The FactHandle to be removed * @throws FactException */ public void removeLogicalDependencies(final InternalFactHandle handle) throws FactException { final BeliefSet beliefSet = (BeliefSet) this.justifiedMap.remove( handle.getId() ); if ( beliefSet != null && !beliefSet.isEmpty() ) { for ( LinkedListEntry entry = (LinkedListEntry) beliefSet.getFirst(); entry != null; entry = (LinkedListEntry) entry.getNext() ) { final LogicalDependency node = (LogicalDependency) entry.getObject(); node.getJustifier().getLogicalDependencies().remove( node ); } } }
memory.events.remove(factHandle);
this.hashedSinkMap.remove( hashKey );
null, previous ); WindowTupleList list = (WindowTupleList) memory.events.remove( previous );
/** * Retracts the corresponding tuple by retrieving and retracting * the fact created for it */ public void retractLeftTuple(final LeftTuple tuple, final PropagationContext context, final InternalWorkingMemory workingMemory) { final RIAMemory memory = (RIAMemory) workingMemory.getNodeMemory( this ); // retrieve handle from memory final InternalFactHandle factHandle = (InternalFactHandle) memory.memory.remove( tuple ); for ( RightTuple rightTuple = factHandle.getFirstRightTuple(); rightTuple != null; rightTuple = (RightTuple) rightTuple.getHandleNext() ) { rightTuple.getRightTupleSink().retractRightTuple( rightTuple, context, workingMemory ); } factHandle.clearRightTuples(); for ( LeftTuple leftTuple = factHandle.getLastLeftTuple(); leftTuple != null; leftTuple = (LeftTuple) leftTuple.getLeftParentNext() ) { leftTuple.getLeftTupleSink().retractLeftTuple( leftTuple, context, workingMemory ); } factHandle.clearLeftTuples(); }
value, fieldAccessor ); this.hashedSinkMap.remove( hashKey ); if ( fieldIndex.getCount() <= this.alphaNodeHashingThreshold - 1 ) {