Skip to content

An Example to Demonstrate Object Pool Design Pattern

Notifications You must be signed in to change notification settings

ttnny/object-pool-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Object Pool Design Pattern

This repo is an example to demonstrate how the Object Pool Design Pattern works.

Brief

A creational design pattern.

This pattern allows to reuse the objects that are expensive or slow to instantiate. The pool is a container which contains a specified amount of objects. When an object is taken from the pool, it is not available in the pool until it is put back. Objects in the pool have a lifecycle: creation, validation and destroy.

— Javatpoint.com

Participants

  • Pool: The most important class. It works as a controller to handle clients' requests for reusable objects.
  • Objects: The reusable objects that are expensive or slow to instantiate.
  • Client: The class that requests to use object(s) in the pool.

UML Diagram

UML Diagram for This Example of Object Pool Design Pattern

References

Releases

No releases published

Packages

No packages published

Languages