Class TapeLibraryPoolImpl
java.lang.Object
fr.gouv.vitam.storage.offers.tape.pool.TapeLibraryPoolImpl
- All Implemented Interfaces:
TapeDrivePool
,TapeLibraryPool
,TapeRobotPool
-
Constructor Summary
ConstructorDescriptionTapeLibraryPoolImpl
(String libraryIdentifier, BlockingQueue<TapeRobotService> tapeRobotServicePool, ConcurrentHashMap<Integer, TapeDriveService> tapeDriveServicePool) -
Method Summary
Modifier and TypeMethodDescriptioncheckoutDriveService
(Integer driveIndex) Retrieves and removes the head of this pool, waiting if necessary until an element becomes available.Retrieves and removes the head of this pool, waiting if necessary until an element becomes available.checkoutRobotService
(long timeout, TimeUnit unit) Retrieves and removes the head of this queue, waiting up to the specified wait time if necessary for an element to become available.drives()
void
pushDriveService
(TapeDriveService tapeDriveService) Return or add TapeDriveService to the poolvoid
pushRobotService
(TapeRobotService tapeRobotService) Return or add TapeRobotService to the pool
-
Constructor Details
-
TapeLibraryPoolImpl
public TapeLibraryPoolImpl(String libraryIdentifier, BlockingQueue<TapeRobotService> tapeRobotServicePool, ConcurrentHashMap<Integer, TapeDriveService> tapeDriveServicePool)
-
-
Method Details
-
checkoutRobotService
Description copied from interface:TapeRobotPool
Retrieves and removes the head of this pool, waiting if necessary until an element becomes available.- Specified by:
checkoutRobotService
in interfaceTapeRobotPool
- Returns:
- TapeRobotService
- Throws:
InterruptedException
-
checkoutRobotService
public TapeRobotService checkoutRobotService(long timeout, TimeUnit unit) throws InterruptedException Description copied from interface:TapeRobotPool
Retrieves and removes the head of this queue, waiting up to the specified wait time if necessary for an element to become available.- Specified by:
checkoutRobotService
in interfaceTapeRobotPool
- Returns:
- TapeRobotService
- Throws:
InterruptedException
-
checkoutDriveService
Description copied from interface:TapeDrivePool
Retrieves and removes the head of this pool, waiting if necessary until an element becomes available.- Specified by:
checkoutDriveService
in interfaceTapeDrivePool
- Returns:
- TapeDriveService
-
pushRobotService
Description copied from interface:TapeRobotPool
Return or add TapeRobotService to the pool- Specified by:
pushRobotService
in interfaceTapeRobotPool
- Throws:
InterruptedException
-
pushDriveService
Description copied from interface:TapeDrivePool
Return or add TapeDriveService to the pool- Specified by:
pushDriveService
in interfaceTapeDrivePool
-
drives
- Specified by:
drives
in interfaceTapeDrivePool
-
getLibraryIdentifier
- Specified by:
getLibraryIdentifier
in interfaceTapeRobotPool
-