Class DelegatingChooser

  • All Implemented Interfaces:
    VolumeChooser

    public class DelegatingChooser
    extends Object
    implements VolumeChooser
    A VolumeChooser that delegates to another volume chooser based on other properties: table.custom.volume.chooser for tables, and general.custom.volume.chooser.scoped for scopes. general.custom.volume.chooser.{scope} can override the system-wide setting for general.custom.volume.chooser.scoped. At the time this was written, the only known scope was "logger".
    Since:
    2.1.0
    • Constructor Detail

      • DelegatingChooser

        public DelegatingChooser()
    • Method Detail

      • choose

        public String choose​(VolumeChooserEnvironment env,
                             Set<String> options)
        Description copied from interface: VolumeChooser
        Choose a volume from the provided options.
        Specified by:
        choose in interface VolumeChooser
        Parameters:
        env - the server environment provided by the calling framework
        options - the list of volumes to choose from
        Returns:
        one of the options
      • choosable

        public Set<String> choosable​(VolumeChooserEnvironment env,
                                     Set<String> options)
        Description copied from interface: VolumeChooser
        Return the subset of volumes that could possibly be chosen by this chooser across all invocations of VolumeChooser.choose(VolumeChooserEnvironment, Set). Currently this is used to determine if all of the volumes that could be chosen for write ahead logs support the needed filesystem operations. There may be other use cases in the future.
        Specified by:
        choosable in interface VolumeChooser
        Parameters:
        env - the server environment provided by the calling framework
        options - the subset of volumes to choose from
        Returns:
        array of valid options