| The SingleEntryQueue is used by the
RenderHub to queue up
Renderable s for render calls. The queue is a specialized version of a
LinkedBlockingQueue that holds, at most, one instance of a Renderable.
To clarify, let's say a Renderable is initially offered to the queue. It is
the first one so there is no rendering calls being executed and the queue is
empty. The Renderable is accepted into the queue and then is removed from
the queue and a render call is executed.
While that render call is underway, the same Renderable is again offered to
the queue. Since it is not in the queue yet, it is again accepted.
But now we suppose that it's waiting to be pulled off the queue (the thread
pools is busy) and the same Renderable is again offered (Renderable equality
is based on the equality of the internal
com.icesoft.faces.webapp.xmlhttp.PersistentFacesStatePersistentFacesState it contains). This time it is not accepted because the
Renderable is already on the queue and any subsequent render calls should
take care of all changes to the underlying DOM. This is how the render calls
for a given Renderable are efficiently coalesced.
author: ICEsoft Technologies, Inc. |