package com.ard.work.domain.cache; import com.ard.data.region.domain.ArdDeptRegion; import lombok.extern.slf4j.Slf4j; import java.util.concurrent.ConcurrentHashMap; /** * 无人机区域缓存(简化版) * * @author 刘苏义 */ @Slf4j public class UavRegionCache { // 无人机当前区域名称缓存 Map<无人机ID, 区域> private static final ConcurrentHashMap cache = new ConcurrentHashMap<>(); // 存储数据到缓存 public static void put(String boxSn, ArdDeptRegion region) {cache.put(boxSn, region);} // 从缓存中获取数据 public static ArdDeptRegion get(String boxSn) { return cache.get(boxSn); } // 删除缓存中的数据 public static void remove(String boxSn) { cache.remove(boxSn); } }