本文整理汇总了Java中org.apache.ignite.internal.util.typedef.internal.U.detectClassLoader方法的典型用法代码示例。如果您正苦于以下问题:Java U.detectClassLoader方法的具体用法?Java U.detectClassLoader怎么用?Java U.detectClassLoader使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.ignite.internal.util.typedef.internal.U
的用法示例。
在下文中一共展示了U.detectClassLoader方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: classLoader
import org.apache.ignite.internal.util.typedef.internal.U; //导入方法依赖的package包/类
/** {@inheritDoc} */
@Override public ClassLoader classLoader() {
if (ldr == null)
ldr = U.detectClassLoader(deployClass());
return ldr;
}
示例2: extractAndLoad
import org.apache.ignite.internal.util.typedef.internal.U; //导入方法依赖的package包/类
/**
* @param errs Errors collection.
* @param rsrcPath Path.
* @return {@code True} if library was found and loaded.
*/
private static boolean extractAndLoad(Collection<Throwable> errs, File tmpDir, String rsrcPath) {
ClassLoader clsLdr = U.detectClassLoader(IpcSharedMemoryNativeLoader.class);
URL rsrc = clsLdr.getResource(rsrcPath);
if (rsrc != null)
return extract(errs, rsrc, new File(tmpDir, mapLibraryName(LIB_NAME)));
else {
errs.add(new IllegalStateException("Failed to find resource with specified class loader " +
"[rsrc=" + rsrcPath + ", clsLdr=" + clsLdr + ']'));
return false;
}
}
示例3: classLoader
import org.apache.ignite.internal.util.typedef.internal.U; //导入方法依赖的package包/类
/** {@inheritDoc} */
@Override public ClassLoader classLoader() {
return U.detectClassLoader(p2pCls);
}
示例4: CacheClassLoader
import org.apache.ignite.internal.util.typedef.internal.U; //导入方法依赖的package包/类
/**
* Sets context class loader as parent.
*/
private CacheClassLoader() {
this(U.detectClassLoader(GridCacheDeploymentManager.class));
}