Module kala.compress.archivers.zip
Package kala.compress.archivers.zip
Class DefaultBackingStoreSupplier
- java.lang.Object
-
- kala.compress.archivers.zip.DefaultBackingStoreSupplier
-
- All Implemented Interfaces:
ScatterGatherBackingStoreSupplier
public class DefaultBackingStoreSupplier extends java.lang.Object implements ScatterGatherBackingStoreSupplier
ImplementsScatterGatherBackingStoreSupplierusing a temporary folder.For example:
final Path dir = Paths.get("target/custom-temp-dir"); Files.createDirectories(dir); final ParallelScatterZipCreator zipCreator = new ParallelScatterZipCreator(Executors.newFixedThreadPool(Runtime.getRuntime().availableProcessors()), new DefaultBackingStoreSupplier(dir));- Since:
- 1.23
-
-
Constructor Summary
Constructors Constructor Description DefaultBackingStoreSupplier(java.nio.file.Path dir)Constructs a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ScatterGatherBackingStoreget()Constructs a ScatterGatherBackingStore.
-
-
-
Field Detail
-
PREFIX
private static final java.lang.String PREFIX
- See Also:
- Constant Field Values
-
storeNum
private final java.util.concurrent.atomic.AtomicInteger storeNum
-
dir
private final java.nio.file.Path dir
-
-
Method Detail
-
get
public ScatterGatherBackingStore get() throws java.io.IOException
Description copied from interface:ScatterGatherBackingStoreSupplierConstructs a ScatterGatherBackingStore.- Specified by:
getin interfaceScatterGatherBackingStoreSupplier- Returns:
- a ScatterGatherBackingStore, not null
- Throws:
java.io.IOException- when something fails
-
-