本文整理汇总了Java中org.apache.ignite.internal.util.typedef.internal.U.containsObjectArray方法的典型用法代码示例。如果您正苦于以下问题:Java U.containsObjectArray方法的具体用法?Java U.containsObjectArray怎么用?Java U.containsObjectArray使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.ignite.internal.util.typedef.internal.U
的用法示例。
在下文中一共展示了U.containsObjectArray方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: isLocallyOwnedByThread
import org.apache.ignite.internal.util.typedef.internal.U; //导入方法依赖的package包/类
/**
* @param threadId Thread ID to check.
* @param exclude Versions to ignore.
* @return {@code True} if lock is owned by the thread with given ID.
*/
boolean isLocallyOwnedByThread(long threadId, boolean allowDhtLoc, GridCacheVersion... exclude) {
CacheLockCandidates owners = localOwners();
if (owners != null) {
for (int i = 0; i < owners.size(); i++) {
GridCacheMvccCandidate owner = owners.candidate(i);
if (owner.threadId() == threadId && owner.nodeId().equals(cctx.nodeId()) &&
(allowDhtLoc || !owner.dhtLocal()) && !U.containsObjectArray(exclude, owner.version()))
return true;
}
}
return false;
}
示例2: grids
import org.apache.ignite.internal.util.typedef.internal.U; //导入方法依赖的package包/类
/**
* @param max Maximum index of grid nodes.
* @param exclude Exlude array.
* @return List of grids.
*/
public List<Ignite> grids(int max, Ignite... exclude) {
List<Ignite> ignites = new ArrayList<>();
for (int i = 0; i < max; i++) {
Ignite g = grid(i);
if (!U.containsObjectArray(exclude, g))
ignites.add(g);
}
return ignites;
}