The Parametric Singleton Design Pattern
By: Douglas Lyon, Francisco Castellanos
Abstract
The parametric singleton design pattern combines the singleton design pattern with a parameter that enables unique creation of instances of a class. These instances are cached in a table. When a user asks for an instance with these parameters, the table is checked and instances are created conditionally. Lazy instantiation is not new, nor, for that matter, is the singleton design pattern. However, parametric lazy instantiation is new and so is the parametric singleton.
Cite as:
Douglas Lyon, Francisco Castellanos, “The Parametric Singleton Design Pattern”, Journal of Object Technology, Volume 6, no. 3 (March 2007), pp. 13-23, doi:10.5381/jot.2007.6.3.c2.
PDF | HTML | DOI | BiBTeX | Tweet this | Post to CiteULike | Share on LinkedIn