@Test public void test() throws Exception { SharedResourcesBrokerImpl<SimpleScopeType> broker = SharedResourcesBrokerFactory.<SimpleScopeType>createDefaultTopLevelBroker( ConfigFactory.empty(), SimpleScopeType.GLOBAL.defaultScopeInstance()); FileSystemKey key = new FileSystemKey(new URI("file: FileSystemFactory<SimpleScopeType> factory = new FileSystemFactory<>(); FileSystem fs = broker.getSharedResource(factory, key); verifyInstrumentedOnce(fs); SharedResourcesBroker<SimpleScopeType> subBroker = broker.newSubscopedBuilder(SimpleScopeType.LOCAL.defaultScopeInstance()).build(); FileSystem subBrokerFs = FileSystemFactory.get(new URI("file: Assert.assertEquals(fs, subBrokerFs); }
public static <S extends ScopeType<S>> FileSystem get(Configuration configuration, SharedResourcesBroker<S> broker) throws IOException { return get(FileSystem.getDefaultUri(configuration), configuration, broker); }
FileSystemFactory implements SharedResourceFactory<FileSystem, FileSystemKey, S> { public static <S extends ScopeType<S>> FileSystem get(Configuration configuration, SharedResourcesBroker<S> broker) throws IOException { return get(FileSystem.getDefaultUri(configuration), configuration, broker); } }
FileSystemFactory implements SharedResourceFactory<FileSystem, FileSystemKey, S> { public static <S extends ScopeType<S>> FileSystem get(Configuration configuration, SharedResourcesBroker<S> broker) throws IOException { return get(FileSystem.getDefaultUri(configuration), configuration, broker); }  }
FileSystemFactory implements SharedResourceFactory<FileSystem, FileSystemKey, S> { public static <S extends ScopeType<S>> FileSystem get(Configuration configuration, SharedResourcesBroker<S> broker) throws IOException { return get(FileSystem.getDefaultUri(configuration), configuration, broker); }  static FileSystem get(Configuration configuration, SharedResourcesBroker<S> broker); static FileSystem get(URI uri, Configuration configuration, SharedResourcesBroker<S> broker); @Override String getName(); @Override SharedResourceFactoryResponse<FileSystem> createResource(SharedResourcesBroker<S> broker,
      ScopedConfigView<S, FileSystemKey> config); @Override S getAutoScope(SharedResourcesBroker<S> broker, ConfigView<S, FileSystemKey> config); }
FileSystemFactory implements SharedResourceFactory<FileSystem, FileSystemKey, S> { public static <S extends ScopeType<S>> FileSystem get(Configuration configuration, SharedResourcesBroker<S> broker) throws IOException { return get(FileSystem.getDefaultUri(configuration), configuration, broker); }  static FileSystem get(Configuration configuration, SharedResourcesBroker<S> broker); static FileSystem get(URI uri, Configuration configuration, SharedResourcesBroker<S> broker); @Override String getName(); @Override SharedResourceFactoryResponse<FileSystem> createResource(SharedResourcesBroker<S> broker,
      ScopedConfigView<S, FileSystemKey> config); @Override S getAutoScope(SharedResourcesBroker<S> broker, ConfigView<S, FileSystemKey> config); static final String FACTORY_NAME; }