...
Wiki Markup |
---|
*heap memory* : "Memory that can be shared between threads is called shared memory or heap memory. All instance fields, static fields and array elements are stored in heap memory.\[...\] Local variables (§14.4), formal method parameters (§8.4.1) or exception handler parameters are never shared between threads and are unaffected by the memory model." \[[JLS 2005|AA. Bibliography#JLS 05]\]. |
Anchor |
---|
immutable | immutable |
immutable : When applied to an object, this means that its state cannot be changed after being initialized. "An object is immutable if:
...
...
All its fields are final;\[12\] and
...
*hide* : One class field hides a field in a superclass if they have the same identifier. The hidden field is not accessible from the class. Likewise, a class method hides a method in a superclass if they have the same identifier but incompatible signatures. The hidden method is not accessible from the class. See \[[JLS 2005|AA. Bibliography#JLS 05]\] section [8.4.8.2|http://java.sun.com/docs/books/jls/third_edition/html/classes.html#8.4.8.2] for the formal definition. Contrast with [BB. Definitions#override]. |
immutable : When applied to an object, this means that its state cannot be changed after being initialized. "An object is immutable if:
- Its state cannot be modified after construction;
Wiki Markup |
---|
All its fields are final;\[12\] and |
- It is properly constructed (the
this
reference does not escape during construction).
Wiki Markup |
---|
\[12\] It is technically possible to have an immutable object without all fields being {{final}}. {{String}} is such a class but this relies on delicate reasoning about benign data races that requires a deep understanding of the Java Memory Model. (For the curious: {{String}} lazily computes the hash code the first time {{hashCode}} is called and caches it in a nonfinal field, but this works only because that field can take on only one nondefault value that is the same every time it is computed because it is derived deterministically from immutable state." \[[Goetz 2006|AA. Bibliography#Goetz 06]\]. |
Immutable objects are inherently thread-safe; they may be shared between multiple threads or published without synchronization, though it is usually required to declare the fields containing their references volatile
to ensure visibility. An immutable object may contain mutable sub-objects, provided the state of the sub-objects cannot be modified after construction of the immutable object has concluded.
Anchor |
---|
| initialization safety |
---|
| initialization safety |
---|
|
Wiki Markup |
---|
\[12\] It is technically possible to have an immutable object without all fields being {{final}}. {{String}} is such a class but this relies on delicate reasoning about benign data races that requires a deep understanding of the Java Memory Model. (For the curious: {{String}} lazily computes the hash code the first time {{hashCode}} is called and caches it in a nonfinal field, but this works only because that field can take on only one nondefault value that is the same every time it is computed because it is derived deterministically from immutable state." \[[Goetz 2006|AA. Bibliography#Goetz 06]\]. |
Immutable objects are inherently thread-safe; they may be shared between multiple threads or published without synchronization, though it is usually required to declare the fields containing their references volatile
to ensure visibility. An immutable object may contain mutable sub-objects, provided the state of the sub-objects cannot be modified after construction of the immutable object has concluded.
*initialization safety* : "An object is considered to be completely initialized when its constructor finishes. A thread that can only see a reference to an object after that object has been completely initialized is guaranteed to see the correctly initialized values for that object's final fields." \[[JLS 2005|AA. Bibliography#JLS 05]\]. |
Anchor |
---|
| interruption policy |
---|
| interruption policy |
---|
|
Wiki Markup |
---|
*interruption policy:* "An interruption policy determines how a thread interprets an interruption request - what it does (if anything) when one is detected, what units of work are considered atomic with respect to interruption, and how quickly it reacts to interruption." \[[Goetz 2006|AA. Bibliography#Goetz 06]\]. |
Anchor |
---|
| instance variable |
---|
| instance variable |
---|
|
Anchor |
---|
initialization safety | initialization safety |
|
Wiki Markup |
---|
*initializationinstance safetyvariable* : "An objectinstance variable is considered to be completely initialized when its constructor finishes. A thread that can only see a reference to an object after that object has been completely initialized is guaranteed to see the correctly initialized values for that object's final fields." \[[JLS 2005|AA. Bibliography#JLS 05]\]. |
Anchor |
---|
interruption policy | interruption policy | Wiki Markup |
---|
*interruption policy:* "An interruption policy determines how a thread interprets an interruption request - what it does (if anything) when one is detected, what units of work are considered atomic with respect to interruption, and how quickly it reacts to interruption." \[[Goetz 2006|AA. Bibliography#Goetz 06]\]. |
a field declared within a class declaration without using the keyword {{static}}. If a class {{T}} has a field a that is an instance variable, then a new instance variable a is created and initialized to a default value as part of each newly created object of class {{T}} or of any class that is a subclass of {{T}}. The instance variable effectively ceases to exist when the object of which it is a field is no longer referenced, after any necessary finalization of the object has been completed." \[[JLS 2005|AA. Bibliography#JLS 05]\]. |
liveness : Every operation or method invocation executes to completion without interruptions, even if it goes against safety.
Anchor |
---|
| memory model |
---|
| memory model |
---|
|
Anchor |
---|
instance variable | instance variable |
|
Wiki Markup |
---|
*instancememory variablemodel* : "An instance variable is a field declared within a class declaration without using the keyword {{static}}. If a class {{T}} has a field a that is an instance variable, then a new instance variable a is created and initialized to a default value as part of each newly created object of class {{T}} or of any class that is a subclass of {{T}}. The instance variable effectively ceases to exist when the object of which it is a field is no longer referenced, after any necessary finalization of the object has been completed." \[[JLS 2005|AA. Bibliography#JLS 05The rules that determine how memory accesses are ordered and when they are guaranteed to be visible are known as the memory model of the Java programming language" \[[JPL 2006|AA. Bibliography#JPL 06]\]. "A memory model describes, given a program and an execution trace of that program, whether the execution trace is a legal execution of the program." \[[JLS 2005|AA. Bibliography#JLS 05]\]. |
Anchor |
---|
| normalization |
---|
| normalization |
---|
|
Wiki Markup |
---|
*normalization* : Lossy conversion of the data to its simplest known (and anticipated) form. "When implementations keep strings in a normalized form, they can be assured that equivalent strings have a unique binary representation" \[[Davis 2008|AA. Bibliography#Davis 08]\]. |
liveness : Every operation or method invocation executes to completion without interruptions, even if it goes against safety.
| normalization (URI) |
---|
| normalization (URI) |
---|
|
Anchor |
---|
memory model | memory model | Wiki Markup |
---|
*memorynormalization model(URI)* : "TheNormalization rulesis thatthe determine how memory accesses are ordered and when they are guaranteed to be visible are known as the memory model of the Java programming language" \[[JPL 2006|AA. Bibliography#JPL 06]\]. "A memory model describes, given a program and an execution trace of that program, whether the execution trace is a legal execution of the program." \[[JLS 2005|AA. Bibliography#JLS 05]\]. process of removing unnecessary "." and ".." segments from the path component of a hierarchical URI. Each "." segment is simply removed. A ".." segment is removed only if it is preceded by a non-".." segment. Normalization has no effect upon opaque URIs \[[API 2006|AA. Bibliography#API 06]\]. |
Anchor |
---|
|
Anchor |
---|
normalization | normalization |
|
Wiki Markup |
---|
*normalizationobscure* : Lossy conversion of the data to its simplest known (and anticipated) form. "When implementations keep strings One scoped identifier obscures another identifier in a containing scope if the two identifiers are the same but they refer to
class field hides a field in a normalizedsuperclass form,if they can be assured that equivalent strings have a unique binary representation" \[[Davis 2008|AA. Bibliography#Davis 08]\]. have the same identifier. The hidden field is not accessible from the class. Likewise, a class method hides a method in a superclass if they have the same identifier but incompatible signatures. The hidden method is not accessible from the class. See \[[JLS 2005|AA. Bibliography#JLS 05]\] section [6.3.2|http://java.sun.com/docs/books/jls/third_edition/html/names.html#6.3.2] for more information. |
Anchor |
---|
| obsolete reference |
---|
| obsolete reference |
---|
|
Wiki Markup |
---|
*obsolete reference* : "An obsolete reference is simply a reference
that will never be dereferenced again." \[[Bloch 2008|AA. Bibliography#Bloch 08 |
Anchor |
---|
normalization (URI) | normalization (URI) | Wiki Markup |
---|
*normalization (URI)* : Normalization is the process of removing unnecessary "." and ".." segments from the path component of a hierarchical URI. Each "." segment is simply removed. A ".." segment is removed only if it is preceded by a non-".." segment. Normalization has no effect upon opaque URIs \[[API 2006|AA. Bibliography#API 06]\]. |
Anchor |
---|
| open call |
---|
| open call | obsolete reference | obsolete reference |
---|
|
Wiki Markup |
---|
*obsoleteopen referencecall* : "An obsoletealien method referenceinvoked isoutside simplyof a reference
that will never be dereferenced again." synchronized region is known as an open call \[Lea00 2.4.1.3\]". \[[Bloch 2008|AA. Bibliography#Bloch 08]\] and \[[BlochLea 20082000|AA. Bibliography#BlochBibliography#Lea 0800]\]. |
Anchor |
---|
| open call override open call |
---|
| override |
---|
|
Wiki Markup |
---|
*open calloverride* : "AnOne alienclass method overrides invokeda outsidemethod ofin a synchronized regionsuperclass if they have compatible signatures. The overridden method is knownstill accessible asfrom anthe openclass callvia \[Lea00 2.4.1.3\]". the {{super}} keyword. See \[[BlochJLS 20082005|AA. Bibliography#BlochBibliography#JLS 0805]\] andsection \[[Lea 2000|AA. Bibliography#Lea 00]\][8.4.8.1|http://java.sun.com/docs/books/jls/third_edition/html/classes.html#8.4.8.1] for the formal definition. |
Anchor |
---|
| partial order |
---|
| partial order |
---|
|
...