@Override public String choose(VolumeChooserEnvironment env, String[] options) throws VolumeChooserException { log.trace("{}.choose", getClass().getSimpleName()); return getDelegateChooser(env).choose(env, options); }
@Override public String choose(VolumeChooserEnvironment env, String[] options) { final String choice; choice = chooser.choose(env, options); if (!(ArrayUtils.contains(options, choice))) { String msg = "The configured volume chooser, '" + chooser.getClass() + "', or one of its delegates returned a volume not in the set of options provided"; throw new VolumeChooserException(msg); } return choice; }
@Override public String choose(Optional<String> tableId, String[] options) { final VolumeChooserEnvironment env = new VolumeChooserEnvironment(tableId); final String choice = chooser.choose(env, options); if (!(ArrayUtils.contains(options, choice))) { log.error("The configured volume chooser, '" + chooser.getClass() + "', or one of its delegates returned a volume not in the set of" + " options provided; will continue by relying on a RandomVolumeChooser." + " You should investigate and correct the named chooser."); return failsafeChooser.choose(env, options); } return choice; }
return chooser.choose(env, options);