com.scudata.server.http.LinksPool Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of esproc Show documentation
Show all versions of esproc Show documentation
SPL(Structured Process Language) A programming language specially for structured data computing.
package com.scudata.server.http;
public class LinksPool {
private static int maxLinks = 20;
private static int currLinks = 0;
public synchronized static void addLink() {
currLinks++;
}
public synchronized static void removeLink() {
currLinks--;
}
public synchronized static int countLinks() {
return currLinks;
}
public static void setMaxLinks( int maxLink ) {
maxLinks = maxLink;
}
public static int getMaxLinks() {
return maxLinks;
}
public synchronized static boolean canCreateLink() {
return currLinks < maxLinks;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy