| 构造器和说明 |
|---|
ConnectionPool(ConnectionSelectStrategy strategy)
Constructor
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
add(Connection connection)
add a connection
|
boolean |
contains(Connection connection)
check weather a connection already added
|
Connection |
get()
get a connection
|
List<Connection> |
getAll()
get all connections
|
long |
getLastAccessTimestamp()
Getter method for property lastAccessTimestamp.
|
boolean |
isAsyncCreationDone()
is async create connection done
|
boolean |
isEmpty()
is connection pool empty
|
void |
markAsyncCreationDone()
do mark async create connection done
|
void |
markAsyncCreationStart()
do mark async create connection start
|
void |
removeAllAndTryClose()
remove all connections
|
void |
removeAndTryClose(Connection connection)
removeAndTryClose a connection
|
void |
scan()
Scan it.
|
int |
size()
connection pool size
|
public ConnectionPool(ConnectionSelectStrategy strategy)
strategy - ConnectionSelectStrategypublic void add(Connection connection)
connection - Connectionpublic boolean contains(Connection connection)
connection - Connectionpublic void removeAndTryClose(Connection connection)
connection - Connectionpublic void removeAllAndTryClose()
public Connection get()
public List<Connection> getAll()
public int size()
public boolean isEmpty()
public long getLastAccessTimestamp()
public boolean isAsyncCreationDone()
public void markAsyncCreationDone()
public void markAsyncCreationStart()
Copyright © 2020. All rights reserved.