Package fr.gouv.vitam.common.storage.cas.container.api

# Class ContentAddressableStorageAbstract

java.lang.Object
fr.gouv.vitam.common.storage.cas.container.api.ContentAddressableStorageAbstract

All Implemented Interfaces:
  `VitamAutoCloseable`, `ContentAddressableStorage`, `AutoCloseable`

Direct Known Subclasses:
  `AmazonS3V2`, `ContentAddressableStorageJcloudsAbstract`, `HashFileSystem`, `Swift`

public abstract class ContentAddressableStorageAbstract extends Object implements ContentAddressableStorage
Abstract class of CAS that contains common methos

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final int`
  `LISTING_MAX_RESULTS`
  Max result for listing option TODO: have to be configurable ?

- ## Constructor Summary

  Constructors
  Modifier
  Constructor
  Description
  `protected`
  `ContentAddressableStorageAbstract(StorageConfiguration configuration)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected void`
  `cacheExistsContainer(String containerName, boolean exists)`
  This handle cache already existing container Prevent handling an i/o check container exists Do only memory check if the container is already exists
  `protected String`
  `computeObjectDigest(String containerName, String objectName, DigestType algo)`
  `protected org.apache.commons.lang3.tuple.Pair<String,Long>`
  `computeObjectDigestAndSize(String containerName, String objectName, DigestType algo)`
  `static void`
  `disableContainerCaching()`
  `StorageConfiguration`
  `getConfiguration()`
  `protected boolean`
  `isExistingContainerInCache(String containerName)`
  Determines if a container exists in cache

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

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

  ### Methods inherited from interface fr.gouv.vitam.common.storage.cas.container.api.ContentAddressableStorage

  `checkAccessRequestStatuses, checkObjectAvailability, checkObjectDigestAndStoreDigest, createAccessRequest, createContainer, deleteObject, getContainerInformation, getObject, getObjectDigest, getObjectMetadata, isExistingContainer, isExistingObject, listContainer, putObject, removeAccessRequest, writeObject`

  ### Methods inherited from interface fr.gouv.vitam.common.model.VitamAutoCloseable

  `close`

- ## Field Details

  - ### LISTING_MAX_RESULTS

    public static final int LISTING_MAX_RESULTS
    Max result for listing option TODO: have to be configurable ?
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### ContentAddressableStorageAbstract

    protected ContentAddressableStorageAbstract(StorageConfiguration configuration)

- ## Method Details

  - ### getConfiguration

    public StorageConfiguration getConfiguration()

  - ### computeObjectDigest

    protected String computeObjectDigest(String containerName, String objectName, DigestType algo) throws ContentAddressableStorageException
    Throws:
      `ContentAddressableStorageException`

  - ### computeObjectDigestAndSize

    protected org.apache.commons.lang3.tuple.Pair<String,Long> computeObjectDigestAndSize(String containerName, String objectName, DigestType algo) throws ContentAddressableStorageException
    Throws:
      `ContentAddressableStorageException`

  - ### isExistingContainerInCache

    protected boolean isExistingContainerInCache(String containerName)
    Determines if a container exists in cache
    Parameters:
      `containerName` - name of container
    Returns:
      boolean type
    Throws:
      `ContentAddressableStorageServerException` - Thrown when internal server error happens

  - ### cacheExistsContainer

    protected void cacheExistsContainer(String containerName, boolean exists)
    This handle cache already existing container Prevent handling an i/o check container exists Do only memory check if the container is already exists
    Parameters:
      `containerName` -
      `exists` -

  - ### disableContainerCaching

    public static void disableContainerCaching()