T
- public class Pool<T> extends Object
Modifier and Type | Field and Description |
---|---|
protected String |
className |
protected String |
lang |
protected static org.apache.log4j.Logger |
LOG |
protected int |
max
Max.
|
protected Queue<T> |
queue
Holds objects.
|
Constructor and Description |
---|
Pool(String className,
String lang,
int count) |
Modifier and Type | Method and Description |
---|---|
void |
add() |
protected T |
getInstance()
Creates a new instance of the given className.
|
String |
getLang() |
T |
poll() |
void |
push(T t) |
protected static org.apache.log4j.Logger LOG
protected int max
protected String className
protected String lang
public Pool(String className, String lang, int count) throws IllegalArgumentException, InvocationTargetException, NoSuchMethodException, SecurityException
className
- count
- SecurityException
NoSuchMethodException
InvocationTargetException
IllegalArgumentException
public String getLang()
public void add()
public void push(T t)
t
- public T poll()
protected T getInstance()
className
- SecurityException
NoSuchMethodException
InvocationTargetException
IllegalArgumentException
Copyright © 2024. All rights reserved.