1
zj
2024-06-13 8eea5be3b36875bd4ffe70e6c3a5bb07b1d829bf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
package com.yami.trading.common.util;
 
import java.util.HashSet;
import java.util.Set;
 
public class LockFilter {
    
    private static final Set<String> filter = new HashSet<String>();
 
    public static boolean add(String target) {
        if (!filter.add(target)) {
            return false;
        } else {
            return true;
        }
    }
 
    public static void remove(String target) {
        filter.remove(target);
    }
 
}