Class AbstractSchemaSourceCache<T extends SchemaSourceRepresentation>

    • Method Detail

      • offer

        protected abstract void offer​(T source)
        Offer a schema source in requested representation for caching. Subclasses need to implement this method to store the schema source. Once they have determined to cache the source, they should call register(SourceIdentifier).
        Parameters:
        source - schema source
      • register

        protected final SchemaSourceRegistration<T> register​(SourceIdentifier sourceIdentifier)
        Register the presence of a cached schema source with the consumer. Subclasses need to call this method once they have cached a schema source representation, or when they have determined they have a schema source is available -- like when a persistent cache reads its cache index.
        Parameters:
        sourceIdentifier - Source identifier
        Returns:
        schema source registration, which the subclass needs to SchemaSourceRegistration.close() once it expunges the source from the cache.
      • schemaSourceEncountered

        public void schemaSourceEncountered​(SchemaSourceRepresentation source)
        Description copied from interface: SchemaSourceListener
        Invoked when the registry sees a concrete source. This callback is typically used by cache-type listeners, who intercept the source, store it locally and announce themselves as a provider of that particular schema source.
        Specified by:
        schemaSourceEncountered in interface SchemaSourceListener
        Parameters:
        source - Schema source