|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.geotools.factory.AbstractFactory org.geotools.factory.FactoryUsingVolatileDependencies
A factory that can not determines all its dependencies at construction time.
Because this factory may creates new factories at any time, it must keep all
user-supplied hints. The general contract of AbstractFactory.hints
said that we can't
use this field for creating new factories. But instances of this classe are special cases
where we can, because this class retains all user-supplied hints.
Extends this class only if you really need to keep all user-supplied hints, because doing so has a cost:
FactoryRegistry
is less likely to reuse existing factory instances, because
any value found in AbstractFactory.hints
that do not agree with a user-supplied hint will cause
to discarts this instance, even if the hint was actually
irrelevant to this factory.
The user-supplied hints may contain references to big objects (for example a coordinate transform backed by a grid), and some of them may not be relevant to this factory. Retaining all hints will prevents their garbage collection.
Field Summary |
Fields inherited from class org.geotools.factory.AbstractFactory |
hints, MAXIMUM_PRIORITY, MINIMUM_PRIORITY, NORMAL_PRIORITY, priority |
Constructor Summary | |
FactoryUsingVolatileDependencies(Hints hints)
Constructs a factory with a default priority. |
|
FactoryUsingVolatileDependencies(Hints hints,
int priority)
Constructs a factory with the specified priority. |
Methods inherited from class org.geotools.factory.AbstractFactory |
getImplementationHints, onDeregistration, onRegistration |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public FactoryUsingVolatileDependencies(Hints hints)
hints
- The user-supplied hints.public FactoryUsingVolatileDependencies(Hints hints, int priority)
hints
- The user-supplied hints.priority
- The priority for this factory, as a number between
AbstractFactory.MINIMUM_PRIORITY
and AbstractFactory.MAXIMUM_PRIORITY
inclusive.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |