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