本文整理汇总了Java中com.threewks.gaetools.logger.Logger类的典型用法代码示例。如果您正苦于以下问题:Java Logger类的具体用法?Java Logger怎么用?Java Logger使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Logger类属于com.threewks.gaetools.logger包,在下文中一共展示了Logger类的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: reindex
import com.threewks.gaetools.logger.Logger; //导入依赖的package包/类
@Override
public int reindex(List<K> keys, int batchSize, ReindexOperation<E> reindexOperation) {
int count = 0;
List<List<K>> batches = Lists.partition(keys, batchSize);
for (List<K> batchKeys : batches) {
List<E> batch = get(batchKeys);
batch = reindexOperation == null ? batch : reindexOperation.apply(batch);
if (reindexOperation != null) {
// we only re-save the batch when a re-index op is supplied, otherwise the data can't have changed.
ofy().save().entities(batch).now();
}
if (shouldSearch()) {
index(batch).complete();
}
count += batch.size();
ofy().clear(); // Clear the Objectify cache to free memory for next batch
Logger.info("Reindexed %d entities of type %s, %d of %d", batch.size(), entityType.getSimpleName(), count, keys.size());
}
return count;
}