新版仿ok交易所-后端
1
zyy
2025-10-21 e8eb68a8fab9d0d4a70e3e5b1d3f09c03d231a03
trading-order-huobi/src/main/java/com.yami.trading.huobi/data/AdjustmentValueCache.java
@@ -3,6 +3,7 @@
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;
@@ -16,6 +17,8 @@
    */
   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;
   }
@@ -24,4 +27,36 @@
      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;
   }
}