com.aliyun.openservices.ons.api.exactlyonce.manager.MetricService Maven / Gradle / Ivy
package com.aliyun.openservices.ons.api.exactlyonce.manager;
import java.util.Map;
import com.aliyun.openservices.ons.api.exactlyonce.aop.model.MQTxContext;
import com.aliyun.openservices.ons.api.exactlyonce.manager.impl.MetricServiceImpl;
/**
* @author gongshi
*/
public class MetricService {
private MetricServiceImpl metricServiceImpl = null;
private MetricService() {
this.metricServiceImpl = new MetricServiceImpl();
}
public void start() {
metricServiceImpl.start();
}
public void stop() {
metricServiceImpl.stop();
}
public void record(MQTxContext context) {
metricServiceImpl.record(context);
}
public void incQueryExpired(long begin) {
metricServiceImpl.incQueryExpired(begin);
}
public void incQueryAcked(long begin) {
metricServiceImpl.incQueryAcked(begin);
}
public void incQueryMsgIdCount(long begin) {
metricServiceImpl.incQueryMsgIdCount(begin);
}
public void incInsertRecord(long begin) {
metricServiceImpl.incInsertRecord(begin);
}
public void incRead() {
metricServiceImpl.incRead();
}
public void incWrite() {
metricServiceImpl.incWrite();
}
public void incDeleteRecord(long begin) {
metricServiceImpl.incDeleteRecord(begin);
}
public Map getCurrentConsumeStatus() {
return metricServiceImpl.getCurrentConsumeStatus();
}
public static final MetricService getInstance() {
return MetricServiceHolder.INSTANCE;
}
private static class MetricServiceHolder {
private static final MetricService INSTANCE = new MetricService();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy