class WatchersForTemplateClass extends Object
TemplateHandles who's templates
are all of exactly the same class. Unless otherwise noted all
methods are thread safe. This method provides the linkage between
TemplateHandles and TransitionWatchers
and for the most part is not visible to the clients of either.| Modifier and Type | Field and Description |
|---|---|
private Queue<TemplateHandle> |
content
All the templates we know about
|
private OutriggerServerImpl |
owner
The OutriggerServerImpl we belong to
|
| Constructor and Description |
|---|
WatchersForTemplateClass(OutriggerServerImpl owner)
Create a new
WatchersForTemplateClass object
associated with the specified TransitionWatchers object. |
| Modifier and Type | Method and Description |
|---|---|
(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<TransitionWatcher> 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) void |
reap(long now)
Visit each
TransitionWatcher and check to see if
it has expired, removing it if it has. |
private final Queue<TemplateHandle> content
private final OutriggerServerImpl owner
WatchersForTemplateClass(OutriggerServerImpl owner)
WatchersForTemplateClass object
associated with the specified TransitionWatchers object.owner - The OutriggerServerImpl that
this object will be a part of.NullPointerException - if owner is
null.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<TransitionWatcher> 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.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.Copyright 2007-2013, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.