import java.util.Comparator;
import java.util.HashMap;
import java.util.Iterator;
+import java.util.List;
import java.util.Map;
-import javax.annotation.Nonnull;
import javax.annotation.concurrent.GuardedBy;
import org.opendaylight.yangtools.yang.model.repo.api.MissingSchemaSourceException;
import org.opendaylight.yangtools.yang.model.repo.api.SchemaRepository;
-import org.opendaylight.yangtools.yang.model.repo.api.SchemaSourceFilter;
import org.opendaylight.yangtools.yang.model.repo.api.SchemaSourceRepresentation;
import org.opendaylight.yangtools.yang.model.repo.api.SourceIdentifier;
import org.opendaylight.yangtools.yang.model.repo.spi.PotentialSchemaSource;
import org.slf4j.LoggerFactory;
/**
- * Abstract base class for {@link SchemaRepository} implementations. It handles registration
- * and lookup of schema sources, subclasses need only to provide their own
- * {@link #createSchemaContextFactory(SchemaSourceFilter)} implementation.
+ * Abstract base class for {@link SchemaRepository} implementations. It handles registration and lookup of schema
+ * sources, subclasses need only to provide their own {@link #createSchemaContextFactory()} implementation.
*/
@Beta
public abstract class AbstractSchemaRepository implements SchemaRepository, SchemaSourceRegistry {
* Schema source listeners.
*/
@GuardedBy("this")
- private final Collection<SchemaListenerRegistration> listeners = new ArrayList<>();
+ private final List<SchemaListenerRegistration> listeners = new ArrayList<>();
@SuppressWarnings("unchecked")
private static <T extends SchemaSourceRepresentation> ListenableFuture<T> fetchSource(
}
@Override
- public <T extends SchemaSourceRepresentation> ListenableFuture<T> getSchemaSource(
- @Nonnull final SourceIdentifier id, @Nonnull final Class<T> representation) {
+ public <T extends SchemaSourceRepresentation> ListenableFuture<T> getSchemaSource(final SourceIdentifier id,
+ final Class<T> representation) {
final ArrayList<AbstractSchemaSourceRegistration<?>> sortedSchemaSourceRegistrations;
synchronized (this) {
@Override
@SuppressWarnings("checkstyle:parameterName")
- public void onFailure(@Nonnull final Throwable t) {
+ public void onFailure(final Throwable t) {
LOG.trace("Skipping notification for encountered source {}, fetching source failed", id, t);
}
}, MoreExecutors.directExecutor());