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 void
create(TapeCatalog tapeCatalog)
java.util.List<TapeCatalog>
find(java.util.List<QueryCriteria> criteria)
TapeCatalog
findById(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 mapvoid
markReady(java.lang.String queueId)
java.util.Optional<TapeCatalog>
receive(org.bson.conversions.Bson inQuery)
boolean
replace(TapeCatalog tapeCatalog)
boolean
update(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:
create
in interfaceTapeCatalogService
- Throws:
TapeCatalogException
-
replace
public boolean replace(TapeCatalog tapeCatalog) throws TapeCatalogException
- Specified by:
replace
in 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:
update
in 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:TapeCatalogService
Return map of drive index with his current tape If all drive are empty then return an empty map- Specified by:
init
in interfaceTapeCatalogService
- Returns:
- Throws:
TapeCatalogException
-
findById
public TapeCatalog findById(java.lang.String tapeId) throws TapeCatalogException
- Specified by:
findById
in interfaceTapeCatalogService
- Throws:
TapeCatalogException
-
find
public java.util.List<TapeCatalog> find(java.util.List<QueryCriteria> criteria) throws TapeCatalogException
- Specified by:
find
in interfaceTapeCatalogService
- Throws:
TapeCatalogException
-
markReady
public void markReady(java.lang.String queueId) throws QueueException
- Specified by:
markReady
in interfaceTapeCatalogService
- Throws:
QueueException
-
receive
public java.util.Optional<TapeCatalog> receive(org.bson.conversions.Bson inQuery) throws QueueException
- Specified by:
receive
in interfaceTapeCatalogService
- Throws:
QueueException
-
-