Package fr.gouv.vitam.storage.engine.server.distribution.impl

# Class TransferThread

java.lang.Object
fr.gouv.vitam.storage.engine.server.distribution.impl.TransferThread

All Implemented Interfaces:
  `Callable<ThreadResponseData>`

public class TransferThread extends Object implements Callable<ThreadResponseData>
Thread Future used to send stream to one offer

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final String`
  `TIMEOUT_TEST`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `TransferThread(int tenantId, String requestId, Driver driver, OfferReference offerReference, StoragePutRequest request, Digest globalDigest, long size)`
  Default constructor
  `TransferThread(int tenantId, String requestId, Driver driver, OfferReference offerReference, StoragePutRequest request, Digest globalDigest, long size, StorageOfferProvider offerProvider)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `ThreadResponseData`
  `call()`
  `static void`
  `setJunitMode(boolean mode)`
  Allow to check timeout in Junit

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### TIMEOUT_TEST

    public static final String TIMEOUT_TEST
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### TransferThread

    public TransferThread(int tenantId, String requestId, Driver driver, OfferReference offerReference, StoragePutRequest request, Digest globalDigest, long size)
    Default constructor
    Parameters:
      `tenantId` -
      `requestId` -
      `driver` - thre diver
      `offerReference` - the offer reference to put object
      `request` - the request to put object
      `globalDigest` - the globalDigest associated with the stream

  - ### TransferThread

    public TransferThread(int tenantId, String requestId, Driver driver, OfferReference offerReference, StoragePutRequest request, Digest globalDigest, long size, StorageOfferProvider offerProvider)

- ## Method Details

  - ### setJunitMode

    public static void setJunitMode(boolean mode)
    Allow to check timeout in Junit
    Parameters:
      `mode` - if true allow to implement timeout using GUID to "timeoutTest"

  - ### call

    public ThreadResponseData call() throws StorageException, StorageDriverException, InterruptedException
    Specified by:
      `call` in interface `Callable<ThreadResponseData>`
    Throws:
      `StorageException`
      `StorageDriverException`
      `InterruptedException`