Package org.eolang.maven
Class OyFallbackSwap
- java.lang.Object
-
- org.eolang.maven.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. ForPullMojo
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 Summary
Constructors Constructor Description OyFallbackSwap(Objectionary first, Objectionary second, boolean swap)
Ctor.
-
-
-
Constructor Detail
-
OyFallbackSwap
public OyFallbackSwap(Objectionary first, Objectionary second, boolean swap)
Ctor.- Parameters:
first
- Initial primarysecond
- Initial secondaryswap
- Whether to swap
-
-
Method Detail
-
get
public org.cactoos.Input get(String name) throws IOException
Description copied from interface:Objectionary
Resolve object.- Specified by:
get
in interfaceObjectionary
- Parameters:
name
- Object name.- Returns:
- Object code.
- Throws:
IOException
- If fails to fetch.
-
-