Class ReadTask
- java.lang.Object
-
- fr.gouv.vitam.storage.offers.tape.worker.tasks.ReadTask
-
- All Implemented Interfaces:
java.util.concurrent.Future<ReadWriteResult>
public class ReadTask extends java.lang.Object implements java.util.concurrent.Future<ReadWriteResult>
-
-
Constructor Summary
Constructors Constructor Description ReadTask(ReadOrder readOrder, TapeCatalog workerCurrentTape, TapeLibraryService tapeLibraryService, TapeCatalogService tapeCatalogService, AccessRequestManager accessRequestManager, ArchiveCacheStorage archiveCacheStorage)
-
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
-
TEMP_EXT
public static final java.lang.String TEMP_EXT
- See Also:
- Constant Field Values
-
done
protected java.util.concurrent.atomic.AtomicBoolean done
-
-
Constructor Detail
-
ReadTask
public ReadTask(ReadOrder readOrder, TapeCatalog workerCurrentTape, TapeLibraryService tapeLibraryService, TapeCatalogService tapeCatalogService, AccessRequestManager accessRequestManager, ArchiveCacheStorage archiveCacheStorage)
-
-
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>
-
-