当前位置: 首页>>代码示例>>Java>>正文


Java U.getAnnotation方法代码示例

本文整理汇总了Java中org.apache.ignite.internal.util.typedef.internal.U.getAnnotation方法的典型用法代码示例。如果您正苦于以下问题:Java U.getAnnotation方法的具体用法?Java U.getAnnotation怎么用?Java U.getAnnotation使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.ignite.internal.util.typedef.internal.U的用法示例。


在下文中一共展示了U.getAnnotation方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: GridDeploymentManager

import org.apache.ignite.internal.util.typedef.internal.U; //导入方法依赖的package包/类
/**
 * @param ctx Grid kernal context.
 */
public GridDeploymentManager(GridKernalContext ctx) {
    super(ctx, ctx.config().getDeploymentSpi());

    if (!ctx.config().isPeerClassLoadingEnabled()) {
        DeploymentSpi spi = ctx.config().getDeploymentSpi();

        IgnoreIfPeerClassLoadingDisabled ann = U.getAnnotation(spi.getClass(),
            IgnoreIfPeerClassLoadingDisabled.class);

        locDep = ann != null ?
            new LocalDeployment(
                ctx.config().getDeploymentMode(),
                ctx.config().getClassLoader() != null ? ctx.config().getClassLoader() : U.gridClassLoader(),
                IgniteUuid.fromUuid(ctx.localNodeId()),
                ctx.userVersion(U.gridClassLoader()),
                String.class.getName()) :
            null;
    }
    else
        locDep = null;
}
 
开发者ID:apache,项目名称:ignite,代码行数:25,代码来源:GridDeploymentManager.java

示例2: testHistorySupported

import org.apache.ignite.internal.util.typedef.internal.U; //导入方法依赖的package包/类
/**
 * @throws Exception If any error occurs.
 */
public void testHistorySupported() throws Exception {
    try {
        final Ignite g = startGrid();

        DiscoverySpi spi = g.configuration().getDiscoverySpi();

        DiscoverySpiHistorySupport ann = U.getAnnotation(spi.getClass(), DiscoverySpiHistorySupport.class);

        assertNotNull("Spi does not have annotation for history support", ann);

        assertTrue("History support is disabled for current spi", ann.value());
    }
    finally {
        stopGrid();
    }
}
 
开发者ID:apache,项目名称:ignite,代码行数:20,代码来源:TcpDiscoverySnapshotHistoryTest.java

示例3: discoOrdered

import org.apache.ignite.internal.util.typedef.internal.U; //导入方法依赖的package包/类
/** @return {@code True} if ordering is supported. */
private boolean discoOrdered() {
    DiscoverySpiOrderSupport ann = U.getAnnotation(ctx.config().getDiscoverySpi().getClass(),
        DiscoverySpiOrderSupport.class);

    return ann != null && ann.value();
}
 
开发者ID:apache,项目名称:ignite,代码行数:8,代码来源:GridDiscoveryManager.java

示例4: historySupported

import org.apache.ignite.internal.util.typedef.internal.U; //导入方法依赖的package包/类
/** @return {@code True} if topology snapshots history is supported. */
private boolean historySupported() {
    DiscoverySpiHistorySupport ann = U.getAnnotation(ctx.config().getDiscoverySpi().getClass(),
        DiscoverySpiHistorySupport.class);

    return ann != null && ann.value();
}
 
开发者ID:apache,项目名称:ignite,代码行数:8,代码来源:GridDiscoveryManager.java

示例5: ensureMultiInstanceSupport

import org.apache.ignite.internal.util.typedef.internal.U; //导入方法依赖的package包/类
/**
 * @param spi SPI implementation.
 * @throws IgniteCheckedException Thrown in case if multi-instance is not supported.
 */
private void ensureMultiInstanceSupport(IgniteSpi spi) throws IgniteCheckedException {
    IgniteSpiMultipleInstancesSupport ann = U.getAnnotation(spi.getClass(),
        IgniteSpiMultipleInstancesSupport.class);

    if (ann == null || !ann.value())
        throw new IgniteCheckedException("SPI implementation doesn't support multiple grid instances in " +
            "the same VM: " + spi);
}
 
开发者ID:apache,项目名称:ignite,代码行数:13,代码来源:IgnitionEx.java

示例6: checkOptional

import org.apache.ignite.internal.util.typedef.internal.U; //导入方法依赖的package包/类
/**
 * @return {@code true} if this check is optional.
 */
private boolean checkOptional() {
    IgniteSpiConsistencyChecked ann = U.getAnnotation(getClass(), IgniteSpiConsistencyChecked.class);

    return ann != null && ann.optional();
}
 
开发者ID:apache,项目名称:ignite,代码行数:9,代码来源:IgniteSpiAdapter.java

示例7: checkEnabled

import org.apache.ignite.internal.util.typedef.internal.U; //导入方法依赖的package包/类
/**
 * @return {@code true} if this check is enabled.
 */
private boolean checkEnabled() {
    return U.getAnnotation(getClass(), IgniteSpiConsistencyChecked.class) != null;
}
 
开发者ID:apache,项目名称:ignite,代码行数:7,代码来源:IgniteSpiAdapter.java

示例8: checkClient

import org.apache.ignite.internal.util.typedef.internal.U; //导入方法依赖的package包/类
/**
 * @return {@code true} if client cluster nodes should be checked.
 */
private boolean checkClient() {
    IgniteSpiConsistencyChecked ann = U.getAnnotation(getClass(), IgniteSpiConsistencyChecked.class);

    return ann != null && ann.checkClient();
}
 
开发者ID:apache,项目名称:ignite,代码行数:9,代码来源:IgniteSpiAdapter.java

示例9: discoOrdered

import org.apache.ignite.internal.util.typedef.internal.U; //导入方法依赖的package包/类
/**
 * @param discoSpi Discovery SPI.
 * @return {@code True} if ordering is supported.
 */
public static boolean discoOrdered(DiscoverySpi discoSpi) {
    DiscoverySpiOrderSupport ann = U.getAnnotation(discoSpi.getClass(), DiscoverySpiOrderSupport.class);

    return ann != null && ann.value();
}
 
开发者ID:apache,项目名称:ignite,代码行数:10,代码来源:IgniteUtils.java

示例10: redirectToClients

import org.apache.ignite.internal.util.typedef.internal.U; //导入方法依赖的package包/类
/**
 * @param msg Message.
 * @return Whether to redirect message to client nodes.
 */
private boolean redirectToClients(TcpDiscoveryAbstractMessage msg) {
    return msg.verified() && U.getAnnotation(msg.getClass(), TcpDiscoveryRedirectToClient.class) != null;
}
 
开发者ID:apache,项目名称:ignite,代码行数:8,代码来源:ServerImpl.java

示例11: ensured

import org.apache.ignite.internal.util.typedef.internal.U; //导入方法依赖的package包/类
/**
 * @param msg Message.
 * @return Whether delivery of the message is ensured.
 */
protected boolean ensured(TcpDiscoveryAbstractMessage msg) {
    return U.getAnnotation(msg.getClass(), TcpDiscoveryEnsureDelivery.class) != null;
}
 
开发者ID:apache,项目名称:ignite,代码行数:8,代码来源:TcpDiscoverySpi.java


注:本文中的org.apache.ignite.internal.util.typedef.internal.U.getAnnotation方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。