Class CachedCRSAuthorityDecorator

  • All Implemented Interfaces:
    AuthorityFactory, CRSAuthorityFactory, Factory, BufferedFactory, Factory, RegistrableFactory

    public final class CachedCRSAuthorityDecorator
    extends AbstractAuthorityFactory
    implements AuthorityFactory, CRSAuthorityFactory, BufferedFactory
    An authority factory that caches all objects created by the delegate CRSAuthorityFactory. 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 the AuthorityFactory authority factory and the result is cached for next time.

    This object is responsible for owning a {{ReferencingObjectCache}}; there are several implementations to choose from on construction.

    Since:
    2.4
    Author:
    Jody Garnett