Class TapeCatalogRepository
java.lang.Object
fr.gouv.vitam.storage.offers.tape.impl.queue.QueueRepositoryImpl
fr.gouv.vitam.storage.offers.tape.impl.catalog.TapeCatalogRepository
- All Implemented Interfaces:
QueueRepository
repository for Tapes Catalog management in mongo.
-
Field Summary
Fields inherited from class fr.gouv.vitam.storage.offers.tape.impl.queue.QueueRepositoryImpl
collection -
Constructor Summary
ConstructorsConstructorDescriptionTapeCatalogRepository(com.mongodb.client.MongoCollection<org.bson.Document> collection) -
Method Summary
Modifier and TypeMethodDescriptioncount tapes matching by statecreateTape(TapeCatalog tapeCatalog) create a tape modelfindTapeById(String tapeId) return tape model according to given IDfindTapes(List<QueryCriteria> criteria) return tape models according to given fieldsbooleanreplaceTape(TapeCatalog tapeCatalog) replace a tape modelbooleanupdateTape(String tapeId, Map<String, Object> fields) apply fields changes for tape tapeIdMethods inherited from class fr.gouv.vitam.storage.offers.tape.impl.queue.QueueRepositoryImpl
add, addIfAbsent, complete, countByStateAndType, initializeOnBootstrap, markError, markReady, receive, receive, receive, receive, remove, tryCancelIfNotStarted
-
Constructor Details
-
TapeCatalogRepository
public TapeCatalogRepository(com.mongodb.client.MongoCollection<org.bson.Document> collection)
-
-
Method Details
-
createTape
create a tape model- Parameters:
tapeCatalog-- Throws:
InvalidParseOperationExceptionTapeCatalogException
-
replaceTape
replace a tape model- Parameters:
tapeCatalog-- Throws:
InvalidParseOperationExceptionTapeCatalogException
-
updateTape
apply fields changes for tape tapeId- Parameters:
tapeId-fields-- Returns:
- true if changes have been applied otherwise false
- Throws:
TapeCatalogException
-
findTapes
return tape models according to given fields- Parameters:
criteria-- Returns:
- Throws:
TapeCatalogException
-
countByState
count tapes matching by state- Returns:
- number of tapes by state
- Throws:
TapeCatalogException
-
findTapeById
return tape model according to given ID- Parameters:
tapeId-- Returns:
- Throws:
TapeCatalogException
-