Skip to content

Commit 87121ab

Browse files
committed
[change] reportNotifyInfo replace reportServer
1 parent c8f071d commit 87121ab

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

core/src/main/java/com/qq/tars/rpc/protocol/tup/UniAttribute.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
public class UniAttribute extends OldUniAttribute {
2929

30-
protected HashMap<String, byte[]> _newData = new HashMap<String, byte[]>();
30+
protected HashMap<String, byte[]> _newData = new HashMap<>();
3131

3232
private HashMap<String, Object> cachedData = new HashMap<String, Object>();
3333

core/src/main/java/com/qq/tars/support/notify/NotifyHelper.java

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
import com.qq.tars.support.log.LoggerFactory;
2222
import com.qq.tars.support.notify.prx.NOTIFYLEVEL;
2323
import com.qq.tars.support.notify.prx.NotifyPrx;
24+
import com.qq.tars.support.notify.prx.ReportInfo;
2425
import org.slf4j.Logger;
2526

2627
public class NotifyHelper {
@@ -80,10 +81,16 @@ private void report(String result, boolean sync) {
8081
if (communicator == null) {
8182
return;
8283
}
83-
8484
NotifyPrx notifyPrx = communicator.stringToProxy(NotifyPrx.class, ConfigurationManager.getInstance().getServerConfig().getNotify());
85-
if (sync) notifyPrx.reportServer(app + "." + server, Thread.currentThread().getId() + "", result);
86-
else notifyPrx.async_reportServer(null, app + "." + server, Thread.currentThread().getId() + "", result);
85+
final ReportInfo reportInfo = new ReportInfo();
86+
reportInfo.setSThreadId(String.valueOf(Thread.currentThread().getId()));
87+
reportInfo.setSServer(app + "." + server );
88+
reportInfo.setSMessage( result);
89+
if(sync){
90+
notifyPrx.reportNotifyInfo(reportInfo);
91+
}else{
92+
notifyPrx.async_reportNotifyInfo( null, reportInfo);
93+
}
8794
} catch (Exception e) {
8895
omLogger.error("RemoteNotify|report error", e);
8996
}

0 commit comments

Comments
 (0)