|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.jini.outrigger.WatchersForTemplateClass
class WatchersForTemplateClass
Holds a collection of TemplateHandle
s who's templates
are all of exactly the same class. Unless otherwise noted all
methods are thread safe. This method provides the linkage between
TemplateHandle
s and TransitionWatchers
and for the most part is not visible to the clients of either.
Field Summary | |
---|---|
private FastList<TemplateHandle> |
contents
All the templates we know about |
private TransitionWatchers |
owner
The object we are inside of |
Constructor Summary | |
---|---|
WatchersForTemplateClass(TransitionWatchers owner)
Create a new WatchersForTemplateClass object
associated with the specified TransitionWatchers object. |
Method Summary | |
---|---|
(package private) void |
add(TransitionWatcher watcher,
EntryRep template)
Add a TransitionWatcher to the list
of watchers looking for visibility transitions in
entries that match the specified template. |
(package private) void |
collectInterested(Set set,
EntryTransition transition,
long ordinal)
Iterate over the watchers associated with this object calling isInterested on each
and if it returns true adding the watcher to the
passed set. |
(package private) OutriggerServerImpl |
getServer()
Return the OutriggerServerImpl this
handle is part of. |
(package private) void |
reap(long now)
Visit each TransitionWatcher and check to see if
it has expired, removing it if it has. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private final FastList<TemplateHandle> contents
private final TransitionWatchers owner
Constructor Detail |
---|
WatchersForTemplateClass(TransitionWatchers owner)
WatchersForTemplateClass
object
associated with the specified TransitionWatchers
object.
owner
- The TransitionWatchers
that
this object will be a part of.
NullPointerException
- if owner
is
null
.Method Detail |
---|
void add(TransitionWatcher watcher, EntryRep template)
TransitionWatcher
to the list
of watchers looking for visibility transitions in
entries that match the specified template. Associates
a TemplateHandle
using
TransitionWatcher.setTemplateHandle
method.
watcher
- The TransitionWatcher
being added.template
- The EntryRep
that represents
the template of interest.
NullPointerException
- if either argument is
null
.void collectInterested(Set set, EntryTransition transition, long ordinal)
isInterested
on each
and if it returns true
adding the watcher to the
passed set.
set
- The set to accumulate interested watchers
into.transition
- The transition being processed.ordinal
- The ordinal associated with transition
.
NullPointerException
- if either argument is null
.OutriggerServerImpl getServer()
OutriggerServerImpl
this
handle is part of.
OutriggerServerImpl
this
handle is part of.void reap(long now)
TransitionWatcher
and check to see if
it has expired, removing it if it has. Also reaps the
FastList
associated with this object.
now
- an estimate of the current time expressed as
milliseconds since the beginning of the epoch.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |