配合前端减少渲染次数,将动态航班信息加入到缓存。隔指定时间xx 后,以数组的形式一次发出。
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
package com.gzzn.omms.msgexchangeapi.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.gzzn.omms.msgexchangeapi.entity.msg.SCHD;
|
||||
|
||||
/**
|
||||
* 消息缓存服务,多线程安全
|
||||
* @author zhouxiunai
|
||||
*
|
||||
*/
|
||||
public interface IMsgBufferService {
|
||||
/**
|
||||
* 添加动态航班信息到缓存
|
||||
* @param fltr
|
||||
*/
|
||||
public void addFltr(SCHD.FLTR fltr);
|
||||
|
||||
/**
|
||||
* 添加动态消息到缓存
|
||||
* @param msg (json 格式)
|
||||
*/
|
||||
public void addMsg(String msg);
|
||||
|
||||
|
||||
/**
|
||||
* 获取缓存中所有的动态航班信息
|
||||
* @return
|
||||
*/
|
||||
public List<SCHD.FLTR> takeAllFltr();
|
||||
|
||||
|
||||
/**
|
||||
* 获取缓存中的所有动态消息
|
||||
* @return
|
||||
*/
|
||||
public List<String> takeAllMsg();
|
||||
}
|
||||
Reference in New Issue
Block a user