/**
* Reads the counters from the prior instance of this class, increments this instances counters and closes the prior.
*/
protected void carryOverAndClose() {
final ManagedScriptMBean oldScript = MBeanServerInvocationHandler.newProxyInstance(JMXHelper.getHeliosMBeanServer(), objectName, ManagedScriptMBean.class, false);
deploymentId = oldScript.getDeploymentId()+1;
totalErrors.add(oldScript.getTotalCollectionErrors());
Date dt = oldScript.getLastCollectionErrorDate();
if(dt!=null) {
lastError.set(dt.getTime());
}
dt = oldScript.getLastCollectionDate();
if(dt!=null) {
lastCompleteCollection.set(dt.getTime());
}
final Long lastElapsed = oldScript.getLastCollectionElapsed();
if(lastElapsed!=null) {
lastCollectionElapsed.set(lastElapsed);
}
try { oldScript.close(); } catch (Exception x) {/* No Op */}
}
ManagedScript.java 文件源码
java
阅读 21
收藏 0
点赞 0
评论 0
项目:HeliosStreams
作者:
评论列表
文章目录