BUG-9043: Remove use of CheckedFuture from YANG components
[yangtools.git] / yang / yang-model-api / src / main / java / org / opendaylight / yangtools / yang / model / repo / api / SchemaContextFactory.java
index 91dfc946f4c004df57ed157ba93c3e04d8b02c06..5fac8367e813967b4311501c7cb3703a56d44117 100644 (file)
@@ -8,7 +8,7 @@
 package org.opendaylight.yangtools.yang.model.repo.api;
 
 import com.google.common.annotations.Beta;
-import com.google.common.util.concurrent.CheckedFuture;
+import com.google.common.util.concurrent.ListenableFuture;
 import java.util.Collection;
 import java.util.Set;
 import javax.annotation.Nonnull;
@@ -32,7 +32,7 @@ public interface SchemaContextFactory {
      *         with an explanation why the creation of the schema context
      *         failed.
      */
-    default CheckedFuture<SchemaContext, SchemaResolutionException> createSchemaContext(
+    default ListenableFuture<SchemaContext> createSchemaContext(
             @Nonnull final Collection<SourceIdentifier> requiredSources) {
         return createSchemaContext(requiredSources, StatementParserMode.DEFAULT_MODE);
     }
@@ -49,7 +49,7 @@ public interface SchemaContextFactory {
      *         with an explanation why the creation of the schema context
      *         failed.
      */
-    default CheckedFuture<SchemaContext, SchemaResolutionException> createSchemaContext(
+    default ListenableFuture<SchemaContext> createSchemaContext(
             final Collection<SourceIdentifier> requiredSources, final StatementParserMode statementParserMode) {
         return createSchemaContext(requiredSources, statementParserMode, null);
     }
@@ -67,7 +67,7 @@ public interface SchemaContextFactory {
      *         with an explanation why the creation of the schema context
      *         failed.
      */
-    default CheckedFuture<SchemaContext, SchemaResolutionException> createSchemaContext(
+    default ListenableFuture<SchemaContext> createSchemaContext(
             @Nonnull final Collection<SourceIdentifier> requiredSources, final Set<QName> supportedFeatures) {
         return createSchemaContext(requiredSources, StatementParserMode.DEFAULT_MODE, supportedFeatures);
     }
@@ -87,7 +87,6 @@ public interface SchemaContextFactory {
      *         with an explanation why the creation of the schema context
      *         failed.
      */
-    CheckedFuture<SchemaContext, SchemaResolutionException> createSchemaContext(
-            Collection<SourceIdentifier> requiredSources, StatementParserMode statementParserMode,
-            Set<QName> supportedFeatures);
+    ListenableFuture<SchemaContext> createSchemaContext(Collection<SourceIdentifier> requiredSources,
+            StatementParserMode statementParserMode, Set<QName> supportedFeatures);
 }