com.sun.jini.thread package
v2.1Beta2 Release Notes
Description
The com.sun.jini.thread package contains various thread
related utility classes and interfaces. These classes and interfaces are
not intended for general use, but are used internally by other parts of the
Jini(TM) Technology Starter Kit (starter kit). Some of these classes and
interfaces are exposed via the configuration mechanism.
Changes since the v2.0.1 release
A number of improvements have been made to the
com.sun.jini.thread.WakeupManager.
WakeupManager instances are used to schedule tasks that need
to be run in the future. Many of the services and utilities in the starter
kit obtain the WakeupManager instances they require from their
configuration.
- The
WakeupManager.ThreadDesc Class Can Now Be More
Usefully Subclassed
-
Instances of the
WakeupManager.ThreadDesc class are used by the
WakeupManager's to create threads. A ThreadDesc
can be optionally specified when a WakeupManager is created,
and/or when a task is scheduled that needs to be run in its own thread.
The
ThreadDesc.thread method has been made protected, this gives
subclasses of ThreadDesc complete control over how threads are
created. Also protected getGroup,
isDaemon,
and getPriority
methods have been added to ThreadDesc and the default
implementation of ThreadDesc.thread has been changed to use
them. This work had been assigned issue number 5091282.
- Added Protected Factory Method for
WakeupManager.Tickets Has Been Added to WakeupManager
-
When a task is added to a
WakeupManager the caller gets a WakeupManager.Ticket
object than can be used to remove the task if necessary. The protected
method WakeupManager.newTicket
has been added so subclasses of WakeupManager can create
Ticket instances. This work had been assigned issue number
6264220.
WakeupManager Only Keeps Internal Thread Running When
There Are Tasks Pending
-
Previous versions of
WakeupManager always had one running
(though often waiting) thread even if there were no pending tasks. This
version of WakeupManager only creates its internal thread when
the first task is enqueued. It will let this thread end, after a
configurable timeout, if there are no tasks pending. This work had been
assigned issue number 6190278.
Copyright 2005, Sun Microsystems, Inc.
Licensed under the Apache License, Version
2.0.