本文整理汇总了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;
}
示例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();
}
}
示例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();
}
示例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();
}
示例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);
}
示例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();
}
示例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;
}
示例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();
}
示例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();
}
示例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;
}
示例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;
}