/** * Propagate a modified object to all object consumers. * @param object The new object. */ protected void propagateModificationToTupleConsumers(Tuple tuple, OAVAttributeType type, Object oldvalue, Object newvalue, IOAVState state, ReteMemory mem, AbstractAgenda agenda) { ITupleConsumerNode[] tcon = tconsumers; for(int i=0; tcon!=null && i<tcon.length; i++) tcon[i].modifyTuple(tuple, tupleindex, type, oldvalue, newvalue, state, mem, agenda); }
/** * Propagate a modified tuple to all tuple consumers. * @param tuple The new tuple. */ protected void propagateModificationToTupleConsumers(Tuple tuple, int tupleindex, OAVAttributeType type, Object oldvalue, Object newvalue, IOAVState state, ReteMemory mem, AbstractAgenda agenda) { ITupleConsumerNode[] tcon = tconsumers; for(int i=0; tcon!=null && i<tcon.length; i++) tcon[i].modifyTuple(tuple, tupleindex, type, oldvalue, newvalue, state, mem, agenda); }
/** * Propagate a modified tuple to all tuple consumers. * @param tuple The new tuple. */ protected void propagateModificationToTupleConsumers(Tuple tuple, int tupleindex, OAVAttributeType type, Object oldvalue, Object newvalue, IOAVState state, ReteMemory mem, AbstractAgenda agenda) { ITupleConsumerNode[] tcon = tconsumers; for(int i=0; tcon!=null && i<tcon.length; i++) tcon[i].modifyTuple(tuple, tupleindex, type, oldvalue, newvalue, state, mem, agenda); }
/** * Propagate a modified object to all object consumers. * @param object The new object. */ protected void propagateModificationToTupleConsumers(Tuple tuple, OAVAttributeType type, Object oldvalue, Object newvalue, IOAVState state, ReteMemory mem, AbstractAgenda agenda) { ITupleConsumerNode[] tcon = tconsumers; for(int i=0; tcon!=null && i<tcon.length; i++) tcon[i].modifyTuple(tuple, tupleindex, type, oldvalue, newvalue, state, mem, agenda); }
/** * Propagate a change of a tuple in the result memory. */ protected void propagateModification(Tuple left, Object right, int tupleindex, OAVAttributeType type, Object oldvalue, Object newvalue, IOAVState state, ReteMemory mem, AbstractAgenda agenda) { Tuple tuple = mem.getTuple(state, left, right); ITupleConsumerNode[] tcs = tconsumers; for(int j=0; tcs!=null && j<tcs.length; j++) tcs[j].modifyTuple(tuple, tupleindex, type, oldvalue, newvalue, state, mem, agenda); }
/** * Propagate a change of a tuple in the result memory. */ protected void propagateModification(Tuple left, Object right, int tupleindex, OAVAttributeType type, Object oldvalue, Object newvalue, IOAVState state, ReteMemory mem, AbstractAgenda agenda) { Tuple tuple = mem.getTuple(state, left, right); ITupleConsumerNode[] tcs = tconsumers; for(int j=0; tcs!=null && j<tcs.length; j++) tcs[j].modifyTuple(tuple, tupleindex, type, oldvalue, newvalue, state, mem, agenda); }
/** * Propagate an object change to this node. * @param object The new object. */ public void modifyObject(Object object, OAVAttributeType type, Object oldvalue, Object newvalue, IOAVState state, ReteMemory mem, AbstractAgenda agenda) { state.getProfiler().start(IProfiler.TYPE_NODE, this); state.getProfiler().start(IProfiler.TYPE_NODEEVENT, IProfiler.NODEEVENT_OBJECTMODIFIED); if(getRelevantAttributes().contains(type)) { // Check if modification changes node memory. Tuple tuple = mem.getTuple(state, null, object); ITupleConsumerNode[] tcs = tconsumers; for(int j=0; tcs!=null && j<tcs.length; j++) tcs[j].modifyTuple(tuple, 0, type, oldvalue, newvalue, state, mem, agenda); } state.getProfiler().stop(IProfiler.TYPE_NODEEVENT, IProfiler.NODEEVENT_OBJECTMODIFIED); state.getProfiler().stop(IProfiler.TYPE_NODE, this); }
/** * Propagate an object change to this node. * @param object The new object. */ public void modifyObject(Object object, OAVAttributeType type, Object oldvalue, Object newvalue, IOAVState state, ReteMemory mem, AbstractAgenda agenda) { state.getProfiler().start(IProfiler.TYPE_NODE, this); state.getProfiler().start(IProfiler.TYPE_NODEEVENT, IProfiler.NODEEVENT_OBJECTMODIFIED); if(getRelevantAttributes().contains(type)) { // Check if modification changes node memory. Tuple tuple = mem.getTuple(state, null, object); ITupleConsumerNode[] tcs = tconsumers; for(int j=0; tcs!=null && j<tcs.length; j++) tcs[j].modifyTuple(tuple, 0, type, oldvalue, newvalue, state, mem, agenda); } state.getProfiler().stop(IProfiler.TYPE_NODEEVENT, IProfiler.NODEEVENT_OBJECTMODIFIED); state.getProfiler().stop(IProfiler.TYPE_NODE, this); }
tcs[j].modifyTuple(left, tupleindex, type, oldvalue, newvalue, state, mem, agenda); tcs[j].modifyTuple(left, tupleindex, type, oldvalue, newvalue, state, mem, agenda);
tcs[j].modifyTuple(left, tupleindex, type, oldvalue, newvalue, state, mem, agenda); tcs[j].modifyTuple(left, tupleindex, type, oldvalue, newvalue, state, mem, agenda);