本文整理汇总了Java中com.datastax.driver.core.Row.isNull方法的典型用法代码示例。如果您正苦于以下问题:Java Row.isNull方法的具体用法?Java Row.isNull怎么用?Java Row.isNull使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.datastax.driver.core.Row
的用法示例。
在下文中一共展示了Row.isNull方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: lazyEventFrom
import com.datastax.driver.core.Row; //导入方法依赖的package包/类
/**
* !!!! WARNING !!!! Very dangerous perfomance optimization, all indexes linked to
* CassandraGCEventRepository.NON_KEY_FIELDS
*/
public static GCEvent lazyEventFrom(Row row) {
if (row == null) {
return null;
}
GCEventImpl gcEvent = new GCEventImpl();
try {
gcEvent.occurred(new DateTime(row.getTimestamp(0), DateTimeZone.UTC))
.pauseMu(row.getLong(1))
.timestamp(row.getDouble(2))
.generations(EnumSetUtils.decode(row.getLong(3), Generation.class))
.concurrency(EventConcurrency.get(row.getInt(4)))
.phase(Phase.get(row.getInt(5)))
.capacity(new Capacity(row.getList(6, Long.class)))
.totalCapacity(new Capacity(row.getList(7, Long.class)))
.cause(_top(row, 11, Cause.OTHER, (Function<Integer, Cause>) Cause::get))
.properties(row.getLong(12));
if (!row.isNull(13)) {
gcEvent.user(row.getDouble(13));
} else {
gcEvent.user(-1);
}
if (!row.isNull(14)) {
gcEvent.sys(row.getDouble(14));
} else {
gcEvent.sys(-1);
}
mapGenerations(row, gcEvent, false);
} catch (Throwable t) {
LOG.error(t.getMessage() + " | " + row.toString());
return null;
}
return gcEvent;
}