/** * Creates a new BlockingClusterStatePublishResponseHandler * @param publishingToNodes the set of nodes to which the cluster state will be published and should respond */ public BlockingClusterStatePublishResponseHandler(Set<DiscoveryNode> publishingToNodes) { this.pendingNodes = ConcurrentCollections.newConcurrentSet(); this.pendingNodes.addAll(publishingToNodes); this.latch = new CountDownLatch(pendingNodes.size()); this.failedNodes = ConcurrentCollections.newConcurrentSet(); }
/** * Creates a new BlockingClusterStatePublishResponseHandler * @param publishingToNodes the set of nodes to which the cluster state will be published and should respond */ public BlockingClusterStatePublishResponseHandler(Set<DiscoveryNode> publishingToNodes) { this.pendingNodes = ConcurrentCollections.newConcurrentSet(); this.pendingNodes.addAll(publishingToNodes); this.latch = new CountDownLatch(pendingNodes.size()); this.failedNodes = ConcurrentCollections.newConcurrentSet(); }
/** * Creates a new BlockingClusterStatePublishResponseHandler * @param publishingToNodes the set of nodes to which the cluster state will be published and should respond */ public BlockingClusterStatePublishResponseHandler(Set<DiscoveryNode> publishingToNodes) { this.pendingNodes = ConcurrentCollections.newConcurrentSet(); this.pendingNodes.addAll(publishingToNodes); this.latch = new CountDownLatch(pendingNodes.size()); this.failedNodes = ConcurrentCollections.newConcurrentSet(); }
private Set<MockUncasedHostProvider> getActiveNodesForCurrentCluster() { assert Thread.holdsLock(activeNodesPerCluster); return activeNodesPerCluster.computeIfAbsent(clusterName, clusterName -> ConcurrentCollections.newConcurrentSet()); }
/** * Creates a new BlockingClusterStatePublishResponseHandler * @param publishingToNodes the set of nodes to which the cluster state will be published and should respond */ public BlockingClusterStatePublishResponseHandler(Set<DiscoveryNode> publishingToNodes) { this.pendingNodes = ConcurrentCollections.newConcurrentSet(); this.pendingNodes.addAll(publishingToNodes); this.latch = new CountDownLatch(pendingNodes.size()); }
/** * Creates a new BlockingClusterStatePublishResponseHandler * @param publishingToNodes the set of nodes to which the cluster state will be published and should respond */ public BlockingClusterStatePublishResponseHandler(Set<DiscoveryNode> publishingToNodes) { this.pendingNodes = ConcurrentCollections.newConcurrentSet(); this.pendingNodes.addAll(publishingToNodes); this.latch = new CountDownLatch(pendingNodes.size()); }
private Set<MockZenPing> getActiveNodesForCurrentCluster() { assert Thread.holdsLock(activeNodesPerCluster); return activeNodesPerCluster.computeIfAbsent(getClusterName(), clusterName -> ConcurrentCollections.newConcurrentSet()); }
public void testConcurrentSendRespondAndDisconnect() throws BrokenBarrierException, InterruptedException { Set<Exception> sendingErrors = ConcurrentCollections.newConcurrentSet(); Set<Exception> responseErrors = ConcurrentCollections.newConcurrentSet(); serviceA.registerRequestHandler("test", TestRequest::new, randomBoolean() ? ThreadPool.Names.SAME : ThreadPool.Names.GENERIC, (request, channel) -> {
final Set<String> liveIds = ConcurrentCollections.newConcurrentSet(); final AtomicBoolean run = new AtomicBoolean(true); Thread[] indexThreads = new Thread[numIndexThreads];