百度asr应用
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
908 B

5 months ago
  1. package com.bw.asr.cache;
  2. import lombok.extern.slf4j.Slf4j;
  3. import java.util.Map;
  4. import java.util.concurrent.LinkedBlockingDeque;
  5. /**
  6. * @author jian.mao
  7. * @date 2022年11月11日
  8. * @description 静态变量类
  9. */
  10. @Slf4j
  11. public class ConfigCache {
  12. /**启动条件**/
  13. public static boolean isStart = true;
  14. /*****任务队列*****/
  15. public static LinkedBlockingDeque<Map<String, Object>> createTaskQueue = new LinkedBlockingDeque<Map<String,Object>>();
  16. public static LinkedBlockingDeque<Map<String, Object>> queryTaskQueue = new LinkedBlockingDeque<Map<String,Object>>();
  17. /**
  18. * 队列录入任务
  19. * @param queue
  20. * @param task
  21. */
  22. public static void putQueue(LinkedBlockingDeque<Map<String, Object>> queue,Map<String, Object> task){
  23. //next app 写入队列准备调出
  24. try {
  25. queue.put(task);
  26. } catch (InterruptedException e) {
  27. log.error("队列写入data失败---");
  28. }
  29. }
  30. }