Class WriteTask
- java.lang.Object
-
- fr.gouv.vitam.storage.offers.tape.worker.tasks.WriteTask
-
- All Implemented Interfaces:
java.util.concurrent.Future<ReadWriteResult>
public class WriteTask extends java.lang.Object implements java.util.concurrent.Future<ReadWriteResult>
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
cancelled
static int
CARTRIDGE_RETRY
protected boolean
done
java.lang.String
MSG_PREFIX
static int
SLEEP_TIME
static java.lang.String
TAPE_LABEL
static java.lang.String
TAPE_MSG
-
Constructor Summary
Constructors Constructor Description WriteTask(WriteOrder writeOrder, TapeCatalog workerCurrentTape, TapeLibraryService tapeLibraryService, TapeCatalogService tapeCatalogService, ArchiveReferentialRepository archiveReferentialRepository, ArchiveCacheStorage archiveCacheStorage, java.lang.String inputTarPath, boolean forceOverrideNonEmptyCartridges)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
cancel(boolean mayInterruptIfRunning)
ReadWriteResult
get()
ReadWriteResult
get(long timeout, java.util.concurrent.TimeUnit unit)
boolean
isCancelled()
boolean
isDone()
-
-
-
Field Detail
-
TAPE_MSG
public static final java.lang.String TAPE_MSG
- See Also:
- Constant Field Values
-
TAPE_LABEL
public static final java.lang.String TAPE_LABEL
- See Also:
- Constant Field Values
-
SLEEP_TIME
public static final int SLEEP_TIME
- See Also:
- Constant Field Values
-
CARTRIDGE_RETRY
public static final int CARTRIDGE_RETRY
- See Also:
- Constant Field Values
-
MSG_PREFIX
public final java.lang.String MSG_PREFIX
-
cancelled
protected boolean cancelled
-
done
protected boolean done
-
-
Constructor Detail
-
WriteTask
public WriteTask(WriteOrder writeOrder, TapeCatalog workerCurrentTape, TapeLibraryService tapeLibraryService, TapeCatalogService tapeCatalogService, ArchiveReferentialRepository archiveReferentialRepository, ArchiveCacheStorage archiveCacheStorage, java.lang.String inputTarPath, boolean forceOverrideNonEmptyCartridges)
-
-
Method Detail
-
get
public ReadWriteResult get()
- Specified by:
get
in interfacejava.util.concurrent.Future<ReadWriteResult>
-
get
public ReadWriteResult get(long timeout, java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedException, java.util.concurrent.ExecutionException, java.util.concurrent.TimeoutException
- Specified by:
get
in interfacejava.util.concurrent.Future<ReadWriteResult>
- Throws:
java.lang.InterruptedException
java.util.concurrent.ExecutionException
java.util.concurrent.TimeoutException
-
cancel
public boolean cancel(boolean mayInterruptIfRunning)
- Specified by:
cancel
in interfacejava.util.concurrent.Future<ReadWriteResult>
-
isCancelled
public boolean isCancelled()
- Specified by:
isCancelled
in interfacejava.util.concurrent.Future<ReadWriteResult>
-
isDone
public boolean isDone()
- Specified by:
isDone
in interfacejava.util.concurrent.Future<ReadWriteResult>
-
-