// Init storage adapters
private static final Map<Class<? extends SchemaSourceRepresentation>, StorageAdapter<? extends SchemaSourceRepresentation>> STORAGE_ADAPTERS =
- Collections.<Class<? extends SchemaSourceRepresentation>, StorageAdapter<? extends SchemaSourceRepresentation>> singletonMap(
+ Collections.singletonMap(
YangTextSchemaSource.class, new YangTextSchemaStorageAdapter());
+ private static final Pattern CACHED_FILE_PATTERN =
+ Pattern.compile(
+ "(?<moduleName>[^@]+)" +
+ "(@(?<revision>" + SourceIdentifier.REVISION_PATTERN + "))?");
+
private final Class<T> representation;
private final File storageDirectory;
"This cache does not support representation: %s, supported representations are: %s", representation, STORAGE_ADAPTERS.keySet()));
}
- private static final Pattern CACHED_FILE_PATTERN =
- Pattern.compile(
- "(?<moduleName>[^@]+)" +
- "(@(?<revision>" + SourceIdentifier.REVISION_PATTERN + "))?");
-
/**
* Restore cache state
*/
}
LOG.debug("Source {} not found in cache as {}", sourceIdentifier, file);
- return Futures.<T, SchemaSourceException>immediateFailedCheckedFuture(new MissingSchemaSourceException("Source not found", sourceIdentifier));
+ return Futures.immediateFailedCheckedFuture(new MissingSchemaSourceException("Source not found", sourceIdentifier));
}
@Override