*
* @param loaderType the type of the lader used to determine the proper refresher.
* @param bucketConfig the config itself.
*/
private void registerBucketForRefresh(final LoaderType loaderType, final BucketConfig bucketConfig) {
Refresher refresher = refreshers.get(loaderType);
if (refresher == null) {
throw new IllegalStateException("Could not find refresher for loader type: " + loaderType);
}
refresher.registerBucket(bucketConfig.name(), bucketConfig.password()).subscribe();
}