|
ref_send API 1.16 defensive programming in Java |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
T - referent typepublic interface Volatile<T>
A promise of unknown origin.
A promise held in a variable of type Volatile must not be trusted
to implement the semantics of a Promise. In particular, the client
code must be prepared to correctly handle an implementation that changes its
referent, or reports a referent and then later reports failure to acquire a
referent, or switches back and forth between all of these states.
| Method Summary | |
|---|---|
T |
cast()
Gets the current referent. |
| Method Detail |
|---|
T cast()
throws java.lang.Exception
For example:
final Volatile<Foo> foo = …
try {
foo.cast().bar();
} catch (final Exception reason) {
// Either there is no current referent, or the bar() call failed.
throw reason;
}
java.lang.Exception - reason the referent is not known
|
ref_send API 1.16 defensive programming in Java |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Copyright 1998-2007 Waterken Inc. under the terms of the MIT X license.