| java.lang.Object sun.rmi.transport.DGCAckHandler
DGCAckHandler | public class DGCAckHandler (Code) | | Holds strong references to a set of remote objects, or live remote
references to remote objects, after they have been marshalled (as
remote references) as parts of the arguments or the result of a
remote invocation. The purpose is to prevent remote objects or
live remote references that might otherwise be determined to be
unreachable in this VM from being locally garbage collected before
the receiver has had an opportunity to register the unmarshalled
remote references for DGC.
The references are held strongly until an acknowledgment has been
received that the receiver has had an opportunity to process the
remote references or until a timeout has expired. For remote
references sent as parts of the arguments of a remote invocation,
the acknowledgment is the beginning of the response indicating
completion of the remote invocation. For remote references sent as
parts of the result of a remote invocation, a UID is included as
part of the result, and the acknowledgment is a transport-level
"DGCAck" message containing that UID.
author: Ann Wollrath author: Peter Jones version: 1.26, 07/05/05 |
Constructor Summary | |
| DGCAckHandler(UID id) Creates a new DGCAckHandler, associated with the specified UID
if the argument is not null. |
Method Summary | |
synchronized void | add(Object obj) Adds the specified reference to this DGCAckHandler. | public static void | received(UID id) Causes the DGCAckHandler associated with the specified UID to
release its references. | synchronized void | release() Releases the references held by this DGCAckHandler. | synchronized void | startTimer() Starts the timer for this DGCAckHandler. |
DGCAckHandler | DGCAckHandler(UID id)(Code) | | Creates a new DGCAckHandler, associated with the specified UID
if the argument is not null.
References added to this DGCAckHandler will be held strongly
until its "release" method is invoked or (after the
"startTimer" method has been invoked) the timeout has expired.
If the argument is not null, then invoking the static
"received" method with the specified UID is equivalent to
invoking this instance's "release" method.
|
add | synchronized void add(Object obj)(Code) | | Adds the specified reference to this DGCAckHandler.
|
received | public static void received(UID id)(Code) | | Causes the DGCAckHandler associated with the specified UID to
release its references.
|
release | synchronized void release()(Code) | | Releases the references held by this DGCAckHandler.
|
startTimer | synchronized void startTimer()(Code) | | Starts the timer for this DGCAckHandler. After the timeout has
expired, the references are released even if the acknowledgment
has not been received.
|
|
|