Class TapeCatalogServiceImpl
- java.lang.Object
-
- fr.gouv.vitam.storage.offers.tape.impl.catalog.TapeCatalogServiceImpl
-
- All Implemented Interfaces:
TapeCatalogService
public class TapeCatalogServiceImpl extends java.lang.Object implements TapeCatalogService
-
-
Constructor Summary
Constructors Constructor Description TapeCatalogServiceImpl(TapeCatalogRepository tapeCatalogRepository)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcreate(TapeCatalog tapeCatalog)java.util.List<TapeCatalog>find(java.util.List<QueryCriteria> criteria)TapeCatalogfindById(java.lang.String tapeId)java.util.Map<java.lang.Integer,TapeCatalog>init(java.lang.String tapeLibraryIdentifier, TapeLibrarySpec libraryState)Return map of drive index with his current tape If all drive are empty then return an empty mapvoidmarkReady(java.lang.String queueId)java.util.Optional<TapeCatalog>receive(org.bson.conversions.Bson inQuery)booleanreplace(TapeCatalog tapeCatalog)booleanupdate(java.lang.String tapeId, java.util.Map<java.lang.String,java.lang.Object> criteria)
-
-
-
Constructor Detail
-
TapeCatalogServiceImpl
public TapeCatalogServiceImpl(TapeCatalogRepository tapeCatalogRepository)
-
-
Method Detail
-
create
public void create(TapeCatalog tapeCatalog) throws TapeCatalogException
- Specified by:
createin interfaceTapeCatalogService- Throws:
TapeCatalogException
-
replace
public boolean replace(TapeCatalog tapeCatalog) throws TapeCatalogException
- Specified by:
replacein interfaceTapeCatalogService- Throws:
TapeCatalogException
-
update
public boolean update(java.lang.String tapeId, java.util.Map<java.lang.String,java.lang.Object> criteria) throws TapeCatalogException- Specified by:
updatein interfaceTapeCatalogService- Throws:
TapeCatalogException
-
init
public java.util.Map<java.lang.Integer,TapeCatalog> init(java.lang.String tapeLibraryIdentifier, TapeLibrarySpec libraryState) throws TapeCatalogException
Description copied from interface:TapeCatalogServiceReturn map of drive index with his current tape If all drive are empty then return an empty map- Specified by:
initin interfaceTapeCatalogService- Returns:
- Throws:
TapeCatalogException
-
findById
public TapeCatalog findById(java.lang.String tapeId) throws TapeCatalogException
- Specified by:
findByIdin interfaceTapeCatalogService- Throws:
TapeCatalogException
-
find
public java.util.List<TapeCatalog> find(java.util.List<QueryCriteria> criteria) throws TapeCatalogException
- Specified by:
findin interfaceTapeCatalogService- Throws:
TapeCatalogException
-
markReady
public void markReady(java.lang.String queueId) throws QueueException- Specified by:
markReadyin interfaceTapeCatalogService- Throws:
QueueException
-
receive
public java.util.Optional<TapeCatalog> receive(org.bson.conversions.Bson inQuery) throws QueueException
- Specified by:
receivein interfaceTapeCatalogService- Throws:
QueueException
-
-