T
- Cached schema source type.public abstract class AbstractSchemaSourceCache<T extends SchemaSourceRepresentation> extends Object implements SchemaSourceListener, SchemaSourceProvider<T>
SchemaSourceRegistry
, where it gets notifications
from. It performs filtering and offer(SchemaSourceRepresentation)
s
conforming sources to the subclass.Modifier | Constructor and Description |
---|---|
protected |
AbstractSchemaSourceCache(SchemaSourceRegistry consumer,
Class<T> representation,
PotentialSchemaSource.Costs cost) |
Modifier and Type | Method and Description |
---|---|
protected abstract void |
offer(T source)
Offer a schema source in requested representation for caching.
|
protected SchemaSourceRegistration<T> |
register(SourceIdentifier sourceIdentifier)
Register the presence of a cached schema source with the consumer.
|
void |
schemaSourceEncountered(SchemaSourceRepresentation source)
Invoked when the registry sees a concrete source.
|
void |
schemaSourceRegistered(Iterable<PotentialSchemaSource<?>> sources)
Invoked when a new schema source is registered by a provider.
|
void |
schemaSourceUnregistered(PotentialSchemaSource<?> source)
Invoked when a schema source is unregistered.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getSource
protected AbstractSchemaSourceCache(SchemaSourceRegistry consumer, Class<T> representation, PotentialSchemaSource.Costs cost)
protected abstract void offer(T source)
register(SourceIdentifier)
.source
- schema sourceprotected final SchemaSourceRegistration<T> register(SourceIdentifier sourceIdentifier)
sourceIdentifier
- Source identifierSchemaSourceRegistration.close()
once it expunges the source
from the cache.public void schemaSourceEncountered(SchemaSourceRepresentation source)
SchemaSourceListener
schemaSourceEncountered
in interface SchemaSourceListener
source
- Schema sourcepublic final void schemaSourceRegistered(Iterable<PotentialSchemaSource<?>> sources)
SchemaSourceListener
SchemaSourceListener.schemaSourceUnregistered(PotentialSchemaSource)
is typically used by transformer-type listeners, who intercept the registration
if the advertised representation matches their input type and register
themselves as a potential provider of the same source in their output
representation type.schemaSourceRegistered
in interface SchemaSourceListener
sources
- Newly available sourcespublic final void schemaSourceUnregistered(PotentialSchemaSource<?> source)
SchemaSourceListener
schemaSourceUnregistered
in interface SchemaSourceListener
source
- Schema source representationCopyright © 2019 OpenDaylight. All rights reserved.