Class OyFallbackSwap

  • All Implemented Interfaces:
    Objectionary

    public final class OyFallbackSwap
    extends Object
    implements Objectionary
    Fallback which can swap primary/secondary repos.

    The key purpose of this class is to allow dynamic determination of which Oy (fist or second) to use as primary and which as fallback based on given boolean property.

    For PullMojo this is used to bypass reading from cache by always checking remote first and only fallback to local in case of object miss:

         new PullMojo.FallbackSwapOy(
             < local >,
             < remote >,
             this.forceUpdate()
         );
     
    Since:
    1.0
    • Constructor Detail

      • OyFallbackSwap

        public OyFallbackSwap​(Objectionary first,
                              Objectionary second,
                              boolean swap)
        Ctor.
        Parameters:
        first - Initial primary
        second - Initial secondary
        swap - Whether to swap