public class ObjectPool extends Object
Constructor and Description |
---|
ObjectPool(int size)
Constructs and object pool with specified size.
|
Modifier and Type | Method and Description |
---|---|
Object |
get()
Pulls out an object from the pool.
|
boolean |
put(Object o)
Puts an object in the pool, those stating that it's "free" or available
for use by another processes and routines.
|
public ObjectPool(int size)
size
- determines the maximum size of the pool. This is the number
free objects that it can manage at the same timepublic Object get()
public boolean put(Object o)
Copyright © 2024 GATE. All rights reserved.