package project.monitor.pledgegalaxy;
|
|
import java.util.Collections;
|
import java.util.HashSet;
|
import java.util.Set;
|
|
public class PledgeLock {
|
|
private static final Set<String> filter = Collections.synchronizedSet(new HashSet<String>());
|
|
public static boolean add(String partyId) {
|
if (!filter.add(partyId)) {
|
return false;
|
} else {
|
return true;
|
}
|
}
|
|
public static void remove(String partyId) {
|
filter.remove(partyId);
|
}
|
}
|