/** * Send a removed object to this node. * @param object The object. */ public void removeObject(Object object, IOAVState state, ReteMemory mem, AbstractAgenda agenda) { //System.out.println("Remove object called: "+this+" "+object); state.getProfiler().start(IProfiler.TYPE_NODE, this); state.getProfiler().start(IProfiler.TYPE_NODEEVENT, IProfiler.NODEEVENT_OBJECTREMOVED); assert mem.hasNodeMemory(this); // if(mem.hasNodeMemory(this)) { Map smem = (Map)mem.getNodeMemory(this); Collection vfs = (Collection)smem.remove(object); if(vfs!=null) { //System.out.println("REM: Object splitted to: "+object+" "+vfs); for(Iterator it=vfs.iterator(); it.hasNext(); ) { propagateRemovalToObjectConsumers(it.next(), state, mem, agenda); } } } state.getProfiler().stop(IProfiler.TYPE_NODEEVENT, IProfiler.NODEEVENT_OBJECTREMOVED); state.getProfiler().stop(IProfiler.TYPE_NODE, this); }
propagateRemovalToObjectConsumers(o, state, mem, agenda);
/** * Send a removed object to this node. * @param object The object. */ public void removeObject(Object object, IOAVState state, ReteMemory mem, AbstractAgenda agenda) { //System.out.println("Remove object called: "+this+" "+object); state.getProfiler().start(IProfiler.TYPE_NODE, this); state.getProfiler().start(IProfiler.TYPE_NODEEVENT, IProfiler.NODEEVENT_OBJECTREMOVED); assert mem.hasNodeMemory(this); // if(mem.hasNodeMemory(this)) { Map smem = (Map)mem.getNodeMemory(this); Collection vfs = (Collection)smem.remove(object); if(vfs!=null) { //System.out.println("REM: Object splitted to: "+object+" "+vfs); for(Iterator it=vfs.iterator(); it.hasNext(); ) { propagateRemovalToObjectConsumers(it.next(), state, mem, agenda); } } } state.getProfiler().stop(IProfiler.TYPE_NODEEVENT, IProfiler.NODEEVENT_OBJECTREMOVED); state.getProfiler().stop(IProfiler.TYPE_NODE, this); }
propagateRemovalToObjectConsumers(o, state, mem, agenda);