Package org.eolang.maven.objectionary
Class OyCaching
- java.lang.Object
-
- org.eolang.maven.objectionary.OyCaching
-
- All Implemented Interfaces:
Objectionary
public final class OyCaching extends Object implements Objectionary
Objectionary which caches objects locally.- Since:
- 1.0
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.eolang.maven.objectionary.Objectionary
Objectionary.Fake
-
-
Constructor Summary
Constructors Constructor Description OyCaching(String ver, Path cache, Objectionary primary)
Ctor.OyCaching(CommitHash hash, Path cache, Objectionary primary)
Ctor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
contains(String name)
Checks whether an Objectionary contains a provided object.org.cactoos.Input
get(String name)
Resolve object.String
toString()
-
-
-
Constructor Detail
-
OyCaching
public OyCaching(CommitHash hash, Path cache, Objectionary primary)
Ctor.- Parameters:
hash
- Commit hash.cache
- Cache directory.primary
- Primary objectionary.
-
OyCaching
public OyCaching(String ver, Path cache, Objectionary primary)
Ctor.- Parameters:
ver
- Version.cache
- Cache directory.primary
- Primary objectionary.
-
-
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.
-
contains
public boolean contains(String name) throws IOException
Description copied from interface:Objectionary
Checks whether an Objectionary contains a provided object.- Specified by:
contains
in interfaceObjectionary
- Parameters:
name
- Object name.- Returns:
- Boolean: "true" if found, "false" if not.
- Throws:
IOException
- If fails to fetch.
-
-