Package fr.gouv.vitam.storage.offers.tape.cas

# Class ArchiveCacheEvictionController

java.lang.Object
fr.gouv.vitam.storage.offers.tape.cas.ArchiveCacheEvictionController

public class ArchiveCacheEvictionController extends Object

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ArchiveCacheEvictionController(AccessRequestReferentialRepository accessRequestReferentialRepository, ObjectReferentialRepository objectReferentialRepository, BucketTopologyHelper bucketTopologyHelper)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `LRUCacheEvictionJudge<ArchiveCacheEntry>`
  `computeEvictionJudge()`
  Computes an eviction judge that prevents eviction of in-use archives (required by active access requests) or eviction of archives that are non-expirable (to be kept forever in cache).
  `LockHandle`
  `createLock(Set<ArchiveCacheEntry> archiveCacheEntries)`

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

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

- ## Constructor Details

  - ### ArchiveCacheEvictionController

    public ArchiveCacheEvictionController(AccessRequestReferentialRepository accessRequestReferentialRepository, ObjectReferentialRepository objectReferentialRepository, BucketTopologyHelper bucketTopologyHelper)

- ## Method Details

  - ### computeEvictionJudge

    public LRUCacheEvictionJudge<ArchiveCacheEntry> computeEvictionJudge()
    Computes an eviction judge that prevents eviction of in-use archives (required by active access requests) or eviction of archives that are non-expirable (to be kept forever in cache).
    Returns:
      An eviction judge that decides if an archive "file-bucket-id/tarId" can be evicted from cache or not.

  - ### createLock

    public LockHandle createLock(Set<ArchiveCacheEntry> archiveCacheEntries)