1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
package org.mule.util.pool; |
8 | |
|
9 | |
import org.mule.api.lifecycle.Disposable; |
10 | |
import org.mule.api.lifecycle.Initialisable; |
11 | |
import org.mule.api.object.ObjectFactory; |
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
public interface ObjectPool extends Initialisable, Disposable |
17 | |
{ |
18 | |
|
19 | |
Object borrowObject() throws Exception; |
20 | |
|
21 | |
void returnObject(Object object); |
22 | |
|
23 | |
int getNumActive(); |
24 | |
|
25 | |
int getMaxActive(); |
26 | |
|
27 | |
void clear(); |
28 | |
|
29 | |
void close(); |
30 | |
|
31 | |
void setObjectFactory(ObjectFactory objectFactory); |
32 | |
|
33 | |
ObjectFactory getObjectFactory(); |
34 | |
|
35 | |
} |