本文整理汇总了Java中org.apache.ignite.internal.util.typedef.internal.U.firstNotNull方法的典型用法代码示例。如果您正苦于以下问题:Java U.firstNotNull方法的具体用法?Java U.firstNotNull怎么用?Java U.firstNotNull使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.ignite.internal.util.typedef.internal.U
的用法示例。
在下文中一共展示了U.firstNotNull方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getPlanForStatement
import org.apache.ignite.internal.util.typedef.internal.U; //导入方法依赖的package包/类
/**
* Generate SELECT statements to retrieve data for modifications from and find fast UPDATE or DELETE args,
* if available.
*
* @param schema Schema.
* @param conn Connection.
* @param p Prepared statement.
* @param fieldsQry Original fields query.
* @param loc Local query flag.
* @return Update plan.
*/
@SuppressWarnings({"unchecked", "ConstantConditions"})
private UpdatePlan getPlanForStatement(String schema, Connection conn, Prepared p, SqlFieldsQuery fieldsQry,
boolean loc, @Nullable Integer errKeysPos) throws IgniteCheckedException {
H2DmlPlanKey planKey = new H2DmlPlanKey(schema, p.getSQL(), loc, fieldsQry);
UpdatePlan res = (errKeysPos == null ? planCache.get(planKey) : null);
if (res != null)
return res;
res = UpdatePlanBuilder.planForStatement(p, loc, idx, conn, fieldsQry, errKeysPos);
// Don't cache re-runs
if (errKeysPos == null)
return U.firstNotNull(planCache.putIfAbsent(planKey, res), res);
else
return res;
}
示例2: DmlPageProcessingResult
import org.apache.ignite.internal.util.typedef.internal.U; //导入方法依赖的package包/类
/** */
@SuppressWarnings("ConstantConditions")
public DmlPageProcessingResult(long cnt, Object[] errKeys, @Nullable SQLException ex) {
this.cnt = cnt;
this.errKeys = U.firstNotNull(errKeys, X.EMPTY_OBJECT_ARRAY);
this.ex = ex;
}
示例3: UpdateResult
import org.apache.ignite.internal.util.typedef.internal.U; //导入方法依赖的package包/类
/**
* Constructor.
*
* @param cnt Updated rows count.
* @param errKeys Array of erroneous keys.
*/
public @SuppressWarnings("ConstantConditions") UpdateResult(long cnt, Object[] errKeys) {
this.cnt = cnt;
this.errKeys = U.firstNotNull(errKeys, X.EMPTY_OBJECT_ARRAY);
}