Class AbstractAuthorityMediator

All Implemented Interfaces:
AuthorityFactory, CRSAuthorityFactory, CSAuthorityFactory, DatumAuthorityFactory, Factory, CoordinateOperationAuthorityFactory, BufferedFactory, Factory, RegistrableFactory
Direct Known Subclasses:
AbstractEpsgMediator

An authority mediator that consults (a possibily shared) cache before delegating the generation of the content to a "worker" authority factory. The behaviour of the createFoo(String) methods first looks if a previously created object exists for the given code. If such an object exists, it is returned directly. The testing of the cache is synchronized and may block if the referencing object is under construction.

If the object is not yet created, the definition is delegated to the appropriate createFoo method of the factory, which will cache the result for next time.

This object is responsible for maintaining an {{ObjectCache}} of "workers" based on the following:

  • Hints.AUTHORITY_MAX_ACTIVE (default 2) - indicates the maximum number of worker created, if non positive the number of workers is unbounded.
  • Hints.
Since:
2.4
Author:
Jody Garnett (Refractions Research), Cory Horner (Refractions Research)