|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.util.concurrent.locks.ReentrantReadWriteLock
com.guiseframework.prototype.AbstractPrototypeProvisionStrategy
public abstract class AbstractPrototypeProvisionStrategy
Abstract strategy for keeping track of prototype providers and working with provisioned prototypes.
When the prototype providers change provided prototypes, those provided prototypes are processed.
Prototype provisions are not processed initially; this strategy should be initialized after construction by calling processPrototypeProvisions().
This class is thread safe based upon its exposed read and write locks.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.util.concurrent.locks.ReentrantReadWriteLock |
|---|
java.util.concurrent.locks.ReentrantReadWriteLock.ReadLock, java.util.concurrent.locks.ReentrantReadWriteLock.WriteLock |
| Constructor Summary | |
|---|---|
AbstractPrototypeProvisionStrategy(PrototypeProvider... prototypeProviders)
Prototype providers constructor. |
|
| Method Summary | |
|---|---|
protected boolean |
addPrototypeProvider(PrototypeProvider prototypeProvider)
Add a prototoype provider to be managed. |
protected java.util.Set<PrototypeProvision<?>> |
gatherPrototypeProvisions()
Gather prototype provisions from the known prototype providers. |
protected java.lang.Iterable<PrototypeProvider> |
getPrototypeProviders()
Returns an iterable to the prototype providers known to this provision strategy. |
void |
processPrototypeProvisions()
Processes prototype provisions. |
protected abstract void |
processPrototypeProvisions(java.util.Set<PrototypeProvision<?>> prototypeProvisions)
Processes prototype provisions. |
protected boolean |
removePrototypeProvider(PrototypeProvider prototypeProvider)
Removes a prototoype provider being managed. |
| Methods inherited from class java.util.concurrent.locks.ReentrantReadWriteLock |
|---|
getOwner, getQueuedReaderThreads, getQueuedThreads, getQueuedWriterThreads, getQueueLength, getReadHoldCount, getReadLockCount, getWaitingThreads, getWaitQueueLength, getWriteHoldCount, hasQueuedThread, hasQueuedThreads, hasWaiters, isFair, isWriteLocked, isWriteLockedByCurrentThread, readLock, toString, writeLock |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractPrototypeProvisionStrategy(PrototypeProvider... prototypeProviders)
prototypeProviders - The prototype providers that will provide prototypes for processing.
java.lang.NullPointerException - if the given prototype providers and/or one or more prototype provider is null.| Method Detail |
|---|
protected java.lang.Iterable<PrototypeProvider> getPrototypeProviders()
protected boolean addPrototypeProvider(PrototypeProvider prototypeProvider)
prototypeProvider - The prototype provider to add.
true if the prototype provider was not already being managed.protected boolean removePrototypeProvider(PrototypeProvider prototypeProvider)
prototypeProvider - The prototype provider to remove.
true if the prototype provider was not already being managed.protected java.util.Set<PrototypeProvision<?>> gatherPrototypeProvisions()
public void processPrototypeProvisions()
gatherPrototypeProvisions(),
processPrototypeProvisions(Set)protected abstract void processPrototypeProvisions(java.util.Set<PrototypeProvision<?>> prototypeProvisions)
prototypeProvisions - The mutable set of prototype provisions to be used.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||