Search in sources :

Example 1 with SingleObjectSinkAdapter

use of org.drools.core.reteoo.SingleObjectSinkAdapter in project drools by kiegroup.

the class ObjectTypeNodeParser method traversePropagator.

private void traversePropagator(ObjectSinkPropagator propagator, NetworkHandler handler) {
    if (propagator instanceof SingleObjectSinkAdapter) {
        // we know there is only a single child sink for this propagator
        ObjectSink sink = propagator.getSinks()[0];
        traverseSink(sink, handler);
    } else if (propagator instanceof CompositeObjectSinkAdapter) {
        CompositeObjectSinkAdapter composite = (CompositeObjectSinkAdapter) propagator;
        if (traverseHashedAlphaNodes) {
            traverseSinkList(composite.getRangeIndexableSinks(), handler);
            traverseSinkList(composite.getHashableSinks(), handler);
            traverseSinkList(composite.getOthers(), handler);
            traverseRangeIndexedAlphaNodes(composite.getRangeIndexMap(), handler);
            traverseHashedAlphaNodes(composite.getHashedSinkMap(), handler);
        } else {
            traverseSinkList(composite.getSinks(), handler);
        }
    } else if (propagator instanceof CompositePartitionAwareObjectSinkAdapter) {
        CompositePartitionAwareObjectSinkAdapter composite = (CompositePartitionAwareObjectSinkAdapter) propagator;
        traverseSinkList(composite.getSinks(), handler);
    }
}
Also used : CompositePartitionAwareObjectSinkAdapter(org.drools.core.reteoo.CompositePartitionAwareObjectSinkAdapter) ObjectSink(org.drools.core.reteoo.ObjectSink) CompositeObjectSinkAdapter(org.drools.core.reteoo.CompositeObjectSinkAdapter) SingleObjectSinkAdapter(org.drools.core.reteoo.SingleObjectSinkAdapter)

Aggregations

CompositeObjectSinkAdapter (org.drools.core.reteoo.CompositeObjectSinkAdapter)1 CompositePartitionAwareObjectSinkAdapter (org.drools.core.reteoo.CompositePartitionAwareObjectSinkAdapter)1 ObjectSink (org.drools.core.reteoo.ObjectSink)1 SingleObjectSinkAdapter (org.drools.core.reteoo.SingleObjectSinkAdapter)1