use of com.actiontech.dble.net.NIOProcessor in project dble by actiontech.
the class FrontendAuthenticator method isDegrade.
// frontend connection reached the user threshold. service degrade
protected boolean isDegrade(String user) {
int benchmark = source.getPrivileges().getBenchmark(user);
if (benchmark > 0) {
int frontendsLength = 0;
NIOProcessor[] processors = DbleServer.getInstance().getFrontProcessors();
for (NIOProcessor p : processors) {
frontendsLength += p.getFrontendsLength();
}
if (frontendsLength >= benchmark) {
return true;
}
}
return false;
}
Aggregations