use of org.drools.core.reteoo.CompositeObjectSinkAdapter.FieldIndex in project drools by kiegroup.
the class CompositePartitionAwareObjectSinkAdapter method hashSink.
private boolean hashSink(ObjectSink sink) {
InternalReadAccessor readAccessor = getHashableAccessor(sink);
if (readAccessor != null) {
int index = readAccessor.getIndex();
if (fieldIndex == null) {
this.fieldIndex = new CompositeObjectSinkAdapter.FieldIndex(index, readAccessor);
this.hashedSinkMap = new ObjectHashMap();
}
if (fieldIndex.getIndex() == index) {
AlphaNode alpha = (AlphaNode) sink;
this.hashedSinkMap.put(new CompositeObjectSinkAdapter.HashKey(index, ((IndexableConstraint) alpha.getConstraint()).getField(), fieldIndex.getFieldExtractor()), alpha, false);
return true;
}
}
this.fieldIndex = null;
this.hashedSinkMap = null;
return false;
}
Aggregations