...
Code Block | ||
---|---|---|
| ||
final class Adder {
private int a;
private int b;
public synchronized int getSum() {
// Check for overflow
return a + b;
}
public synchronized void setValues(int a, int b) {
this.a = a;
this.b = b;
}
}
|
...
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="ebde4d7aabe34d3e-4388c2d2-449947ac-80e4a232-6743bcf2d9077d3f9be6c1aa"><ac:plain-text-body><![CDATA[ | [[API 2006 | AA. Bibliography#API 06]] | Class | ]]></ac:plain-text-body></ac:structured-macro> | |
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="2169a856d923a6cd-1994c7d5-45ab4dfd-95679e6b-42361b0cb3096b6ff1dc503f"><ac:plain-text-body><![CDATA[ | [[Bloch 2008 | AA. Bibliography#Bloch 08]] | Item 66. Synchronize access to shared mutable data | ]]></ac:plain-text-body></ac:structured-macro> | |
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="ddf42ee59a217798-593bbd34-466a484f-97e3bcc8-3692947e1798d2293c48b5ea"><ac:plain-text-body><![CDATA[ | [[Goetz 2006 | AA. Bibliography#Goetz 06]] | 2.3, Locking | ]]></ac:plain-text-body></ac:structured-macro> | |
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="64db677db23ed22a-9e6fd332-4e7b4fa6-ae18aa86-b366d379af425c9e9165fd6e"><ac:plain-text-body><![CDATA[ | [[JLS 2005 | AA. Bibliography#JLS 05]] | [Chapter 17, Threads and Locks, | http://java.sun.com/docs/books/jls/third_edition/html/memory.html], ]]></ac:plain-text-body></ac:structured-macro> | |
| §17.4.5, Happens-Before Order | ||||
| §17.4.3, Programs and Program Order | ||||
| §17.4.8, Executions and Causality Requirements | ||||
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="289fe45c7c69b29b-b6243dbe-4bdd4884-8696aab2-d7ce33834843a4d1492c8bb9"><ac:plain-text-body><![CDATA[ | [[Lea 2000 | AA. Bibliography#Lea 00]] | Section 2.2.7, The Java Memory Model | ]]></ac:plain-text-body></ac:structured-macro> | |
| Section 2.1.1.1, Objects and Locks | ||||
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="127fe1684871f9d5-e4da1a37-449e4770-88f8bebc-40de5a142a85b246b5bb96d5"><ac:plain-text-body><![CDATA[ | [[Tutorials 2008 | AA. Bibliography#Tutorials 08]] | [Java Concurrency Tutorial | http://java.sun.com/docs/books/tutorial/essential/concurrency/index.html] | ]]></ac:plain-text-body></ac:structured-macro> |
...