use of com.tencent.polaris.api.control.Destroyable in project polaris-java by polarismesh.
the class BaseEngine method init.
public void init() throws PolarisException {
sdkContext.init();
subInit();
serviceCallResultListeners = ServiceCallResultListener.getServiceCallResultListeners(sdkContext);
sdkContext.registerDestroyHook(new Destroyable() {
@Override
protected void doDestroy() {
if (null != serviceCallResultListeners) {
for (ServiceCallResultListener listener : serviceCallResultListeners) {
listener.destroy();
}
}
}
});
sdkContext.getValueContext().setValue(CTX_KEY_ENGINE, this);
}
use of com.tencent.polaris.api.control.Destroyable in project polaris-java by polarismesh.
the class DefaultLimitAPI method subInit.
@Override
protected void subInit() {
quotaFlow.init(sdkContext.getExtensions());
sdkContext.registerDestroyHook(new Destroyable() {
@Override
protected void doDestroy() {
quotaFlow.destroy();
}
});
statPlugins = sdkContext.getPlugins().getPlugins(PluginTypes.STAT_REPORTER.getBaseType());
}
Aggregations