Skip to content

Instantly share code, notes, and snippets.

View hsynercn's full-sized avatar
🏠
Working from home

Huseyin Can Ercan hsynercn

🏠
Working from home
View GitHub Profile
@hsynercn
hsynercn / ConnectionPool.java
Created November 10, 2023 17:07
ConnectionPool.java
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;
import java.util.Queue;
import java.util.stream.Collectors;
public class ConnectionPool {
private static final int RESOURCE_RETRIEVAL_TRY_COUNT = 10;
private static final int RESOURCE_RETRIEVAL_WAIT_PERIOD = 1000;
private static final int POOL_SIZE = 10;