本文整理汇总了Java中com.hazelcast.query.extractor.ValueCollector类的典型用法代码示例。如果您正苦于以下问题:Java ValueCollector类的具体用法?Java ValueCollector怎么用?Java ValueCollector使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ValueCollector类属于com.hazelcast.query.extractor包,在下文中一共展示了ValueCollector类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: extract
import com.hazelcast.query.extractor.ValueCollector; //导入依赖的package包/类
@Override
public void extract(QueryResult target, Object argument, ValueCollector collector) {
for (Long docId: target.getDocIds()) {
collector.addObject(docId);
}
//logger.debug("extract.exit; added {} values to {}", target.getDocIds().size(), collector);
}
示例2: extract
import com.hazelcast.query.extractor.ValueCollector; //导入依赖的package包/类
@Override
@SuppressWarnings("unchecked")
public void extract(MapSession target, String argument,
ValueCollector collector) {
String principalName = PRINCIPAL_NAME_RESOLVER.resolvePrincipal(target);
if (principalName != null) {
collector.addObject(principalName);
}
}
示例3: extract
import com.hazelcast.query.extractor.ValueCollector; //导入依赖的package包/类
@Override
public void extract(SillySequence sillySequence, String indexString, ValueCollector valueCollector) {
valueCollector.addObject(sillySequence.payloadField.get(Integer.parseInt(indexString)));
}