public class TapeLibraryPoolImpl extends Object implements TapeLibraryPool
| Constructor and Description |
|---|
TapeLibraryPoolImpl(String libraryIdentifier,
BlockingQueue<TapeRobotService> tapeRobotServicePool,
ConcurrentHashMap<Integer,TapeDriveService> tapeDriveServicePool,
TapeCatalogService tapeCatalogService) |
| Modifier and Type | Method and Description |
|---|---|
TapeDriveService |
checkoutDriveService(Integer driveIndex)
Retrieves and removes the head of this pool, waiting if necessary
until an element becomes available.
|
TapeRobotService |
checkoutRobotService()
Retrieves and removes the head of this pool, waiting if necessary
until an element becomes available.
|
TapeRobotService |
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.
|
Set<Map.Entry<Integer,TapeDriveService>> |
drives() |
String |
getLibraryIdentifier() |
TapeCatalogService |
getTapeCatalogService() |
void |
pushDriveService(TapeDriveService tapeDriveService)
Return or add TapeDriveService to the pool
|
void |
pushRobotService(TapeRobotService tapeRobotService)
Return or add TapeRobotService to the pool
|
public TapeLibraryPoolImpl(String libraryIdentifier, BlockingQueue<TapeRobotService> tapeRobotServicePool, ConcurrentHashMap<Integer,TapeDriveService> tapeDriveServicePool, TapeCatalogService tapeCatalogService)
public TapeRobotService checkoutRobotService() throws InterruptedException
TapeRobotPoolcheckoutRobotService in interface TapeRobotPoolInterruptedExceptionpublic TapeRobotService checkoutRobotService(long timeout, TimeUnit unit) throws InterruptedException
TapeRobotPoolcheckoutRobotService in interface TapeRobotPoolInterruptedExceptionpublic TapeDriveService checkoutDriveService(Integer driveIndex)
TapeDrivePoolcheckoutDriveService in interface TapeDrivePoolpublic void pushRobotService(TapeRobotService tapeRobotService) throws InterruptedException
TapeRobotPoolpushRobotService in interface TapeRobotPoolInterruptedExceptionpublic void pushDriveService(TapeDriveService tapeDriveService)
TapeDrivePoolpushDriveService in interface TapeDrivePoolpublic Set<Map.Entry<Integer,TapeDriveService>> drives()
drives in interface TapeDrivePoolpublic String getLibraryIdentifier()
getLibraryIdentifier in interface TapeRobotPoolpublic TapeCatalogService getTapeCatalogService()
getTapeCatalogService in interface TapeRobotPoolCopyright © 2019 Vitam. All rights reserved.