CIS-75 Home http://www.c-jump.com/CIS75/CIS75syllabus.htm
Object Pool design pattern is also known as
Resource Pool
N-ton
Performance gains become visible when:
Initializing a Reusable class instance is expensive operation.
Rate of instantiation is high; time of use by clients - low.
|
|
Reusable Pool design implements a facility to periodically clean up the unused objects, for example, with the help of a time measuring proxy.
ReusablePool object maintains a collection of Reusable objects.
Clients collaborate with the ReusablePool class in a very limited manner:
Reusable obj = ReusablePool.getInstance().acquireReusable();
Consider TCP/IP Sequence Diagrams at
The DHCP Sequence Diagram explains how a DHCP client obtains dynamic IP address from the DHCP server.
The DHCP server maintains a cache of leased and available IP addresses.
It is likely that DHCP server implementation could benefit from a Reusable Pool of IP records.
Since the network protocol requires DHCP lease time maintenance, a time measuring proxy may be required to accommodate the lease duration and its operations.