All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.scudata.server.http.LinksPool Maven / Gradle / Ivy

Go to download

SPL(Structured Process Language) A programming language specially for structured data computing.

There is a newer version: 20241126
Show newest version
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