In software engineering, the initialization-on-demand holder (design pattern) idiom is a lazy-loaded singleton. In all versions of Java, the idiom enables a safe, highly concurrent lazy initialization of static fields with good performance. public class Something { private Something {} private static class LazyHolder { static final Something INSTANCE = new Something; } public static Something getInstance { return LazyHolder.INSTANCE; }}
Attributes | Values |
---|
rdf:type
| |
rdfs:label
| - Initialization-on-demand holder idiom (de)
- Support d'initialisation à la demande (fr)
- Initialization-on-demand holder idiom (en)
|
rdfs:comment
| - In der Softwareentwicklung bezeichnet das Entwurfsmuster Initialization on Demand Holder eine Implementierungsmöglichkeit eines sogenannten Lazy-Initialisierten Singleton, also eine Implementierung, bei der das Objekt erst bei der ersten Verwendung initialisiert wird. In allen Java-Versionen erlaubt es eine sichere, hochgradig parallelisierbare Lazy-Initialisierung mit guter Performance. (de)
- En génie logiciel, le patron de conception Support d'initialisation à la demande (initialization on demand holder) est un singleton à . Il peut être implémenté aussi bien en environnement séquentiel ou mono-thread que dans un environnement concurrent, même si, dans ce dernier cas, un soin particulier doit y être apporté pour s'assurer que son implémentation est correcte. (fr)
- In software engineering, the initialization-on-demand holder (design pattern) idiom is a lazy-loaded singleton. In all versions of Java, the idiom enables a safe, highly concurrent lazy initialization of static fields with good performance. public class Something { private Something {} private static class LazyHolder { static final Something INSTANCE = new Something; } public static Something getInstance { return LazyHolder.INSTANCE; }} (en)
|
dcterms:subject
| |
Wikipage page ID
| |
Wikipage revision ID
| |
Link from a Wikipage to another Wikipage
| |
Link from a Wikipage to an external page
| |
sameAs
| |
dbp:wikiPageUsesTemplate
| |
has abstract
| - In der Softwareentwicklung bezeichnet das Entwurfsmuster Initialization on Demand Holder eine Implementierungsmöglichkeit eines sogenannten Lazy-Initialisierten Singleton, also eine Implementierung, bei der das Objekt erst bei der ersten Verwendung initialisiert wird. In allen Java-Versionen erlaubt es eine sichere, hochgradig parallelisierbare Lazy-Initialisierung mit guter Performance. (de)
- In software engineering, the initialization-on-demand holder (design pattern) idiom is a lazy-loaded singleton. In all versions of Java, the idiom enables a safe, highly concurrent lazy initialization of static fields with good performance. public class Something { private Something {} private static class LazyHolder { static final Something INSTANCE = new Something; } public static Something getInstance { return LazyHolder.INSTANCE; }} The implementation of the idiom relies on the initialization phase of execution within the Java Virtual Machine (JVM) as specified by the Java Language Specification (JLS). When the class Something is loaded by the JVM, the class goes through initialization. Since the class does not have any static variables to initialize, the initialization completes trivially. The static class definition LazyHolder within it is not initialized until the JVM determines that LazyHolder must be executed. The static class LazyHolder is only executed when the static method getInstance is invoked on the class Something, and the first time this happens the JVM will load and initialize the LazyHolder class. The initialization of the LazyHolder class results in static variable INSTANCE being initialized by executing the (private) constructor for the outer class Something. Since the class initialization phase is guaranteed by the JLS to be sequential, i.e., non-concurrent, no further synchronization is required in the static getInstance method during loading and initialization. And since the initialization phase writes the static variable INSTANCE in a sequential operation, all subsequent concurrent invocations of the getInstance will return the same correctly initialized INSTANCE without incurring any additional synchronization overhead. (en)
- En génie logiciel, le patron de conception Support d'initialisation à la demande (initialization on demand holder) est un singleton à . Il peut être implémenté aussi bien en environnement séquentiel ou mono-thread que dans un environnement concurrent, même si, dans ce dernier cas, un soin particulier doit y être apporté pour s'assurer que son implémentation est correcte. (fr)
|
gold:hypernym
| |
prov:wasDerivedFrom
| |
page length (characters) of wiki page
| |
foaf:isPrimaryTopicOf
| |
is Link from a Wikipage to another Wikipage
of | |
is Wikipage redirect
of | |
is foaf:primaryTopic
of | |