/** {@inheritDoc} */ @Override public boolean apply(ClusterNode node) { try { return node.order() > 1; } catch (UnsupportedOperationException e) { return false; } } }
/** {@inheritDoc} */ @Override public boolean apply(ClusterNode node) { return node.order() > 1; } }
/** {@inheritDoc} */ @Override public boolean apply(ClusterNode node) { // Do not start cache on coordinator. return node.order() > 1; } }
/** {@inheritDoc} */ @Override public boolean apply(ClusterNode node) { return node.order() != excludeOrder; } }
/** {@inheritDoc} */ @Override public boolean apply(ClusterNode node) { return node.order() == includeOrder; } }
/** {@inheritDoc} */ @Override public long getNodeOrder() { return getLocalNode().order(); } }
@Override public boolean apply(ClusterNode locNode, ClusterNode rmtNode) { return block && rmtNode.order() == 3; } };
@Override public boolean apply(ClusterNode node) { return node.order() % 2 == 1; } };
/** * Generate unique connection id. * @return connection id. */ private long nextConnectionId() { return (ctx.discovery().localNode().order() << 32) + nextConnId.getAndIncrement(); }
/** * @param crdNode Assigned coordinator node. * @return Coordinator version. */ private long coordinatorVersion(ClusterNode crdNode) { return crdNode.order() + ctx.discovery().gridStartTime(); }
/** * Short node representation. * * @param n Grid node. * @return Short string representing the node. */ public static String toShortString(ClusterNode n) { return "ClusterNode [id=" + n.id() + ", order=" + n.order() + ", addr=" + n.addresses() + ", daemon=" + n.isDaemon() + ']'; }
/** * @return Caches to be started when this node starts. */ @Nullable public LocalJoinCachesContext localJoinCachesContext() { if (ctx.discovery().localNode().order() == 1 && localConfigs != null) cachesInfo.filterDynamicCacheDescriptors(localConfigs); localConfigs = null; return cachesInfo.localJoinCachesContext(); }
/** * Gets local node order. * * @return Local node order. */ public long localNodeOrder() { assert ctx.discovery() != null; return ctx.discovery().localNode().order(); }
/** {@inheritDoc} */ @Override public void resolve(CommunicationFailureContext ctx) { List<ClusterNode> nodes = ctx.topologySnapshot(); assertTrue(!nodes.isEmpty()); for (ClusterNode node : nodes) { if (killNodeOrders.contains(node.order())) ctx.killNode(node); } } }
/** * @param ccfg Cache configuration. * @throws Exception If failed. */ private void oldestNotAffinityNode1(final CacheConfiguration ccfg) throws Exception { log.info("Test with cache: " + ccfg.getName()); IgniteEx ignite = grid(0); assertEquals(1L, ignite.localNode().order()); ccfg.setNodeFilter(new TestFilterExcludeOldest()); assertNotNull(ignite.getOrCreateCache(ccfg)); awaitPartitionMapExchange(); checkCache(ccfg.getName()); }