Search in sources :

Example 1 with DefaultValueCollector

use of com.hazelcast.query.impl.DefaultValueCollector in project hazelcast by hazelcast.

the class ExtractorGetter method getValue.

@Override
@SuppressWarnings("unchecked")
Object getValue(Object target) throws Exception {
    Object extractionTarget = target;
    // This part will be improved in 3.7 to avoid extra allocation
    DefaultValueCollector collector = new DefaultValueCollector();
    if (target instanceof Data) {
        InternalGenericRecord record = serializationService.readAsInternalGenericRecord((Data) target);
        extractionTarget = new GenericRecordQueryReader(record);
    }
    extractor.extract(extractionTarget, arguments, collector);
    return collector.getResult();
}
Also used : DefaultValueCollector(com.hazelcast.query.impl.DefaultValueCollector) GenericRecordQueryReader(com.hazelcast.internal.serialization.impl.GenericRecordQueryReader) Data(com.hazelcast.internal.serialization.Data) InternalGenericRecord(com.hazelcast.internal.serialization.impl.InternalGenericRecord)

Aggregations

Data (com.hazelcast.internal.serialization.Data)1 GenericRecordQueryReader (com.hazelcast.internal.serialization.impl.GenericRecordQueryReader)1 InternalGenericRecord (com.hazelcast.internal.serialization.impl.InternalGenericRecord)1 DefaultValueCollector (com.hazelcast.query.impl.DefaultValueCollector)1