summary |
shortlog |
log |
commit | commitdiff |
review |
tree
raw |
patch |
inline | side by side (from parent 1:
90ab895)
Instead of using Sets.newConcurrentHashSet(), use the utility
method provided by ConcurrentHashMap.
Change-Id: I796e8b6b260f865138a2716f1bb61c983972a4d4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
0613036fe3fe2a2241eac823ab904d18c6cdaf41)
package org.opendaylight.controller.clustering.it.provider;
import com.google.common.base.Stopwatch;
package org.opendaylight.controller.clustering.it.provider;
import com.google.common.base.Stopwatch;
-import com.google.common.collect.Sets;
import com.google.common.util.concurrent.FutureCallback;
import com.google.common.util.concurrent.Futures;
import com.google.common.util.concurrent.ListenableFuture;
import com.google.common.util.concurrent.MoreExecutors;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import com.google.common.util.concurrent.FutureCallback;
import com.google.common.util.concurrent.Futures;
import com.google.common.util.concurrent.ListenableFuture;
import com.google.common.util.concurrent.MoreExecutors;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
-import java.util.Collection;
+import java.util.Set;
+import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
import java.util.concurrent.atomic.AtomicBoolean;
private final CarEntityOwnershipListener ownershipListener = new CarEntityOwnershipListener();
private final AtomicBoolean registeredListener = new AtomicBoolean();
private final CarEntityOwnershipListener ownershipListener = new CarEntityOwnershipListener();
private final AtomicBoolean registeredListener = new AtomicBoolean();
- private final Collection<ListenerRegistration<?>> carsDclRegistrations =
- Sets.newConcurrentHashSet();
- private final Collection<ListenerRegistration<CarDataTreeChangeListener>> carsDtclRegistrations =
- Sets.newConcurrentHashSet();
+ private final Set<ListenerRegistration<?>> carsDclRegistrations = ConcurrentHashMap.newKeySet();
+ private final Set<ListenerRegistration<CarDataTreeChangeListener>> carsDtclRegistrations =
+ ConcurrentHashMap.newKeySet();
private volatile Thread testThread;
private volatile boolean stopThread;
private volatile Thread testThread;
private volatile boolean stopThread;