新版仿ok交易所-后端
1
zyy3
2026-03-02 d394ddc22071d72e9df7ac7d40772a704151edb7
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
package com.yami.trading.huobi.data;
 
import com.yami.trading.huobi.data.model.AdjustmentValue;
 
import java.math.BigDecimal;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
 
public class AdjustmentValueCache {
    /**
     * 当前值
     */
    private static volatile Map<String, BigDecimal> currentValue = new ConcurrentHashMap();
    /**
     * 延时值
     */
    private static volatile Map<String, AdjustmentValue> delayValue = new ConcurrentHashMap();
 
    private static volatile Map<String, BigDecimal> lastValue = new ConcurrentHashMap();
 
    public static Map<String, BigDecimal> getCurrentValue() {
        return currentValue;
    }
 
    public static Map<String, AdjustmentValue> getDelayValue() {
        return delayValue;
    }
 
    public static Map<String, BigDecimal> getLastValue() {
        return lastValue;
    }
 
 
 
 
    //初始次数
    private static final Map<String, Integer> frequency = new ConcurrentHashMap<>();
 
    //存储预生成的随机分配值列表
    private static final Map<String, List<BigDecimal>> preAllocationList = new ConcurrentHashMap<>();
 
    //记录当前分配到第几个值
    private static final Map<String, Integer> currentAllocationIndex = new ConcurrentHashMap<>();
 
    public static Map<String, Integer> getFrequency() {
        return frequency;
    }
 
    public static Map<String, List<BigDecimal>> getPreAllocatedAdjustments() {
        return preAllocationList;
    }
 
 
    public static Map<String, Integer> getCurrentAdjustmentIndex() {
        return currentAllocationIndex;
    }
 
 
 
 
}