本文整理匯總了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)));
}