/** * @param views Guaranteed to be non-null and to have >= 2 members, or else this thread would not be started */ public synchronized void start(Map<Address, View> views) { if(thread != null && thread.isAlive()) // the merge thread is already running return; this.coords.clear(); this.subviews.clear(); subviews.addAll(views.values()); // now remove all members which don't have us in their view, so RPCs won't block (e.g. FLUSH) // https://jira.jboss.org/browse/JGRP-1061 sanitizeViews(views); Map<Address,Collection<Address>> tmp_coords=determineMergeCoords(views); this.coords.putAll(tmp_coords); thread=gms.getThreadFactory().newThread(this, "MergeTask"); thread.setDaemon(true); thread.start(); }
/** * @param views Guaranteed to be non-null and to have >= 2 members, or else this thread would not be started */ public synchronized void start(Map<Address, View> views) { if(thread != null && thread.isAlive()) // the merge thread is already running return; this.coords.clear(); this.subviews.clear(); subviews.addAll(views.values()); // now remove all members which don't have us in their view, so RPCs won't block (e.g. FLUSH) // https://jira.jboss.org/browse/JGRP-1061 sanitizeViews(views); Map<Address,Collection<Address>> tmp_coords=determineMergeCoords(views); this.coords.putAll(tmp_coords); thread=gms.getThreadFactory().newThread(this, "MergeTask"); thread.setDaemon(true); thread.start(); }