Class StorageClientFactory

java.lang.Object
fr.gouv.vitam.common.client.VitamClientFactory<StorageClient>
fr.gouv.vitam.storage.engine.client.StorageClientFactory
All Implemented Interfaces:
VitamClientFactoryInterface<StorageClient>

public class StorageClientFactory extends VitamClientFactory<StorageClient>

StorageClient factory

Use to get a storage client in function of its type. Example :

 {
     @code
     // Retrieve default storage client
     StorageClient client = StorageClientFactory.getInstance().getStorageClient();

     // Exists
     client.exists(tenantId, strategyId);
 }
 
You can change the type of the client to get. The types are define into the enum StorageClient. Use the changeDefaultClientType method to change the client type.
  • Field Details

  • Method Details

    • getInstance

      public static StorageClientFactory getInstance()
      Get the StorageClientFactory instance
      Returns:
      the instance
    • getClient

      public StorageClient getClient()
      Get the default storage client
      Returns:
      the default storage client
    • changeMode

      public static final void changeMode(ClientConfiguration configuration)