use of com.tencent.wstt.gt.OutPara in project GT by Tencent.
the class DataCacheController method transParasToConsole.
/**
* 将缓存中的出入参数据全部传给控制台(注册与设值),
* 完成后将outParaCache这个一次性缓存清理掉
*/
public void transParasToConsole() {
/*
* 1.入参
*/
if (inParaCache != null) {
Collection<InPara> inParas = inParaCache.getAll();
if (inParas != null) {
for (InPara para : inParas) {
// 加消费者队列
paraTaskCache.add(para);
}
}
// 完成后将outParaCache这个一次性缓存清理掉
inParaCache.clear();
inParaCache = null;
}
/*
* 2.出参
*/
if (outParaCache != null) {
Collection<OutPara> outParas = outParaCache.getAll();
if (outParas != null) {
for (OutPara para : outParas) {
// 加消费者队列
paraTaskCache.add(para);
}
// 完成后将outParaCache这个一次性缓存清理掉
outParaCache.clear();
outParaCache = null;
}
}
}
use of com.tencent.wstt.gt.OutPara in project GT by Tencent.
the class DefaultParaRunEngine method getCurEnableDefaultOutParas.
private List<OutPara> getCurEnableDefaultOutParas() {
List<OutPara> ops = client.getAllOutParas();
enable_default_ops.clear();
for (OutPara op : ops) {
if (OutPara.DISPLAY_DISABLE != op.getDisplayProperty()) {
enable_default_ops.add(op);
}
}
return enable_default_ops;
}
use of com.tencent.wstt.gt.OutPara in project GT by Tencent.
the class GTMemoryDaemonThread method validSingleLimit.
private void validSingleLimit(int curSize, TagTimeEntry tte) {
if (curSize >= singleLimit && OpUIManager.gw_running) {
// 停止单项的采集
Client client = ClientManager.getInstance().getClient(tte.getExkey());
OutPara op = client.getOutPara(tte.getName());
if (// 如果已停止采集,则不需要告警
null != op && op.isMonitor()) {
op.setMonitor(false);
// 发消息提示用户,通知
Message msg = Message.obtain(handler, DaemonHandler.MEM_SINGLE_WARNING_FLAG);
msg.obj = op;
handler.sendMessage(msg);
}
}
}
use of com.tencent.wstt.gt.OutPara in project GT by Tencent.
the class Client method setOutPara.
/**
* 设置输出参数值,值类型为short型,更新的输出参数值会在控制台和输出界面中展示。
*
* @param ParaName
* 输出参数的名称
* @param value
* 输出参数的值
* @param inlog
* 本次设置操作是否打印到日志中记录
*/
public void setOutPara(String paraName, short value) {
OutPara outPara = getOutPara(paraName);
if (null != outPara && OutPara.DISPLAY_DISABLE != outPara.getDisplayProperty()) {
outPara.setValue(String.valueOf(value));
// add on 20130923 为了出参支持历史曲线
OpPerfBridge.addHistory(outPara, outPara.getValue(), value);
}
}
use of com.tencent.wstt.gt.OutPara in project GT by Tencent.
the class OpUIManager method refreshUIOpList.
/**
* 通过此方法更新UI要展示的出参
*/
public static void refreshUIOpList() {
List<OutPara> outParaList = getAll();
// 尚未挂到UI上的非悬浮窗参数、非不关注参数,一律挂到已关注参数的最上面
for (OutPara ov : outParaList) {
if (!list_op.contains(ov) && ov.getDisplayProperty() == AidlEntry.DISPLAY_NORMAL) {
if (-1 != OpUIManager.getOutListDisableTitlePosition()) {
list_op.add(OpUIManager.getOutListDisableTitlePosition(), ov);
} else {
list_op.add(ov);
}
}
}
// 添加默认显示在AC中的出参
// 统计list_op中可以在悬浮窗中默认显示的出参的空位
int pos_divid_line = getOutListDividePosition();
// >1 认为默认显示中有GT默认输出参数
if (pos_divid_line > 1) {
// 将AUT中的参数直接加载列表后面
for (OutPara ov : outParaList) {
if (-1 != getOutListDisableTitlePosition() && OutPara.DISPLAY_AC == ov.getDisplayProperty() && !list_op.contains(ov)) {
list_op.add(getOutListDisableTitlePosition(), ov);
} else if (AidlEntry.DISPLAY_NORMAL == ov.getDisplayProperty() && !list_op.contains(ov)) {
list_op.add(ov);
}
}
} else // =1认为默认显示悬浮窗中没有GT默认输出参数
{
int pos = 1;
for (OutPara ov : outParaList) {
if (pos < 4 && OutPara.DISPLAY_AC == ov.getDisplayProperty() && !list_op.contains(ov)) {
list_op.add(pos, ov);
pos++;
} else {
if (-1 != getOutListDisableTitlePosition() && AidlEntry.DISPLAY_NORMAL == ov.getDisplayProperty() && !list_op.contains(ov)) {
list_op.add(getOutListDisableTitlePosition(), ov);
} else if (AidlEntry.DISPLAY_NORMAL == ov.getDisplayProperty() && !list_op.contains(ov)) {
list_op.add(ov);
}
}
}
}
for (OutPara ov : outParaList) {
if (!list_op.contains(ov) && AidlEntry.DISPLAY_DISABLE == ov.getDisplayProperty()) {
list_op.add(ov);
}
}
}
Aggregations