Class DefaultBackingStoreSupplier
- java.lang.Object
-
- org.apache.commons.compress.archivers.zip.DefaultBackingStoreSupplier
-
- All Implemented Interfaces:
ScatterGatherBackingStoreSupplier
public class DefaultBackingStoreSupplier extends java.lang.Object implements ScatterGatherBackingStoreSupplier
ImplementsScatterGatherBackingStoreSupplier
using 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 ScatterGatherBackingStore
get()
Create 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:ScatterGatherBackingStoreSupplier
Create a ScatterGatherBackingStore.- Specified by:
get
in interfaceScatterGatherBackingStoreSupplier
- Returns:
- a ScatterGatherBackingStore, not null
- Throws:
java.io.IOException
- when something fails
-
-