/** * Retrieves the registry with the given ID and creates a new one if necessary. * * @param registryId * The ID of the desired registry * @return The appropriate string registry */ @SuppressWarnings("PMD.AvoidThrowingRawExceptionTypes") public ReaderRegistry<String> getOrCreateRegistry(final Long registryId) { try { return this.cache.get(registryId, new RegistryLoader()); } catch (final ExecutionException e) { // This should not happen since the loader only creates a // new registry throw new RuntimeException(e); } }
/** * Retrieves the registry with the given ID and creates a new one if necessary. * * @param registryId * The ID of the desired registry * @return The appropriate string registry */ @SuppressWarnings("PMD.AvoidThrowingRawExceptionTypes") public ILookup<String> getOrCreateRegistry(final Long registryId) { try { return this.cache.get(registryId, new RegistryLoader(registryId)); } catch (final ExecutionException e) { // This should not happen since the loader only creates a // new registry throw new RuntimeException(e); } }