Class ReadRequestReferentialRepository
- java.lang.Object
-
- fr.gouv.vitam.storage.offers.tape.cas.ReadRequestReferentialRepository
-
- All Implemented Interfaces:
ReadRequestReferentialCleaner
public class ReadRequestReferentialRepository extends java.lang.Object implements ReadRequestReferentialCleaner
-
-
Constructor Summary
Constructors Constructor Description ReadRequestReferentialRepository(com.mongodb.client.MongoCollection<org.bson.Document> collection)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
cleanUp()
java.util.Optional<TapeReadRequestReferentialEntity>
find(java.lang.String requestId)
void
insert(TapeReadRequestReferentialEntity tapeReadRequestReferentialEntity)
void
invalidate(java.lang.String readOrderRequestId)
void
updateReadRequests(java.lang.String archiveId, TarLocation tarLocation)
Update location of a given archive id in all read request where this archive id exists
-
-
-
Method Detail
-
insert
public void insert(TapeReadRequestReferentialEntity tapeReadRequestReferentialEntity) throws ReadRequestReferentialException
- Throws:
ReadRequestReferentialException
-
find
public java.util.Optional<TapeReadRequestReferentialEntity> find(java.lang.String requestId) throws ReadRequestReferentialException
- Throws:
ReadRequestReferentialException
-
updateReadRequests
public void updateReadRequests(java.lang.String archiveId, TarLocation tarLocation) throws ReadRequestReferentialException
Update location of a given archive id in all read request where this archive id exists- Parameters:
archiveId
-tarLocation
-- Throws:
ReadRequestReferentialException
-
cleanUp
public long cleanUp() throws ReadRequestReferentialException
- Specified by:
cleanUp
in interfaceReadRequestReferentialCleaner
- Throws:
ReadRequestReferentialException
-
invalidate
public void invalidate(java.lang.String readOrderRequestId) throws ReadRequestReferentialException
- Specified by:
invalidate
in interfaceReadRequestReferentialCleaner
- Throws:
ReadRequestReferentialException
-
-