public class ObjectFactory extends Object
Modifier and Type | Field and Description |
---|---|
protected int |
currentPoolSize |
protected Collection<Object> |
freeObjects |
protected Collection<Object> |
usedObjects |
Constructor and Description |
---|
ObjectFactory() |
ObjectFactory(int maxPoolSize) |
Modifier and Type | Method and Description |
---|---|
void |
addToFreePool(Object o) |
void |
addToUsedPool(Object o) |
Object |
getFreeObject() |
Collection<Object> |
getFreeObjects() |
Collection<Object> |
getUsedObjects() |
String |
toString() |
void |
unuseObject(Object o) |
protected final Collection<Object> freeObjects
protected final Collection<Object> usedObjects
protected int currentPoolSize
public ObjectFactory()
public ObjectFactory(int maxPoolSize)
public Object getFreeObject()
public void addToUsedPool(Object o)
public void addToFreePool(Object o)
public void unuseObject(Object o)
public Collection<Object> getUsedObjects()
public Collection<Object> getFreeObjects()
Copyright © 2019. All rights reserved.