提交 0bd73b53 编写于 作者: Y yunyao.zxl 提交者: zhengxiaolinX

[Wisp] Fix Windows compatibility issue by adding dummy getX methods

Summary: as the title

Test Plan: On Windows platform: TestAggressiveHeap.java, TestExcessGCLockerCollections.java and ThreadCpuTimesDeadlock.java

Reviewed-by: yuleil, shiyuexw

Issue: https://github.com/alibaba/dragonwell8/issues/113
上级 2872b8f9
...@@ -23,4 +23,63 @@ package com.alibaba.wisp.engine; ...@@ -23,4 +23,63 @@ package com.alibaba.wisp.engine;
final public class WispCounter { final public class WispCounter {
public long getCompletedTaskCount() {
return 0;
}
public long getTotalEnqueueTime() {
return 0;
}
public long getEnqueueCount() {
return 0;
}
public long getTotalExecutionTime() {
return 0;
}
public long getExecutionCount() {
return 0;
}
public long getTotalWaitSocketIOTime() {
return 0;
}
public long getWaitSocketIOCount() {
return 0;
}
public long getTotalBlockingTime() {
return 0;
}
public long getUnparkCount() {
return 0;
}
public long getMaxEnqueueTime() {
return 0;
}
public long getMaxExecutionTime() {
return 0;
}
public long getMaxWaitSocketIOTime() {
return 0;
}
public long getMaxBlockingTime() {
return 0;
}
public long getTaskQueueLength() {
return 0;
}
public long getRunningTaskCount() {
return 0;
}
} }
...@@ -22,12 +22,15 @@ ...@@ -22,12 +22,15 @@
package com.alibaba.wisp.engine; package com.alibaba.wisp.engine;
import com.alibaba.management.WispCounterMXBean; import com.alibaba.management.WispCounterMXBean;
import sun.management.Util;
import javax.management.ObjectName; import javax.management.ObjectName;
import java.util.List; import java.util.List;
public class WispCounterMXBeanImpl implements WispCounterMXBean { public class WispCounterMXBeanImpl implements WispCounterMXBean {
private final static String WISP_COUNTER_MXBEAN_NAME = "com.alibaba.management:type=WispCounter";
@Override @Override
public List<Boolean> getRunningStates() { public List<Boolean> getRunningStates() {
throw new UnsupportedOperationException(); throw new UnsupportedOperationException();
...@@ -145,6 +148,6 @@ public class WispCounterMXBeanImpl implements WispCounterMXBean { ...@@ -145,6 +148,6 @@ public class WispCounterMXBeanImpl implements WispCounterMXBean {
@Override @Override
public ObjectName getObjectName() { public ObjectName getObjectName() {
throw new UnsupportedOperationException(); return Util.newObjectName(WISP_COUNTER_MXBEAN_NAME);
} }
} }
...@@ -23,4 +23,63 @@ package com.alibaba.wisp.engine; ...@@ -23,4 +23,63 @@ package com.alibaba.wisp.engine;
final public class WispCounter { final public class WispCounter {
public long getCompletedTaskCount() {
return 0;
}
public long getTotalEnqueueTime() {
return 0;
}
public long getEnqueueCount() {
return 0;
}
public long getTotalExecutionTime() {
return 0;
}
public long getExecutionCount() {
return 0;
}
public long getTotalWaitSocketIOTime() {
return 0;
}
public long getWaitSocketIOCount() {
return 0;
}
public long getTotalBlockingTime() {
return 0;
}
public long getUnparkCount() {
return 0;
}
public long getMaxEnqueueTime() {
return 0;
}
public long getMaxExecutionTime() {
return 0;
}
public long getMaxWaitSocketIOTime() {
return 0;
}
public long getMaxBlockingTime() {
return 0;
}
public long getTaskQueueLength() {
return 0;
}
public long getRunningTaskCount() {
return 0;
}
} }
...@@ -22,12 +22,15 @@ ...@@ -22,12 +22,15 @@
package com.alibaba.wisp.engine; package com.alibaba.wisp.engine;
import com.alibaba.management.WispCounterMXBean; import com.alibaba.management.WispCounterMXBean;
import sun.management.Util;
import javax.management.ObjectName; import javax.management.ObjectName;
import java.util.List; import java.util.List;
public class WispCounterMXBeanImpl implements WispCounterMXBean { public class WispCounterMXBeanImpl implements WispCounterMXBean {
private final static String WISP_COUNTER_MXBEAN_NAME = "com.alibaba.management:type=WispCounter";
@Override @Override
public List<Boolean> getRunningStates() { public List<Boolean> getRunningStates() {
throw new UnsupportedOperationException(); throw new UnsupportedOperationException();
...@@ -145,6 +148,6 @@ public class WispCounterMXBeanImpl implements WispCounterMXBean { ...@@ -145,6 +148,6 @@ public class WispCounterMXBeanImpl implements WispCounterMXBean {
@Override @Override
public ObjectName getObjectName() { public ObjectName getObjectName() {
throw new UnsupportedOperationException(); return Util.newObjectName(WISP_COUNTER_MXBEAN_NAME);
} }
} }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册