|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.lang.ref.Reference | +--java.lang.ref.WeakReference | +--org.erights.e.elib.vat.WeakPtr
Untamed: The E-equivalent of WeakReference.
A WeakPtr without an reactor is just an unregistered Java WeakReference. A WeakPtr with an reactor also has the additional behavior of doing
reactor <- run()when the referent gets GCed.
Confined E code must not be given access to weak references of any kind, as that would expose them to GC timing non-determinism. This non-determinism can be logged, so it doesn't threaten replay, but it would enable a confined Bob to read a covert channel written by Mallet, and so enable Bob to receive instructions from Mallet.
Field Summary | |
(package private) Message |
myMessage
The message to be sent to myReactor to inform it that referent is toast. |
(package private) Object |
myReactor
Package-scope so it can be grabbed by the WeakPtrThread. |
(package private) Vat |
myVat
Package-scope so it can be grabbed by the WeakPtrThread. |
Constructor Summary | |
WeakPtr(Object referent,
Object reactor,
String verb,
Object[] args)
Enabled: Makes a WeakPtr to referent that eventually notifies the reactor by |
|
WeakPtr(Object referent,
Runnable reactor)
Enabled: Makes a WeakPtr to referent that eventually notifies the reactor by |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
final Vat myVat
final Object myReactor
final Message myMessage
Stored on creation of this WeakPtr in order to capture the
SendingContext
. Package-scope so it can be grabbed by the
WeakPtrThread.
Constructor Detail |
public WeakPtr(Object referent, Object reactor, String verb, Object[] args)
reactor <- verb(args..)after the referent has been GCed.
public WeakPtr(Object referent, Runnable reactor)
reactor <- run()after the referent has been GCed.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |