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
TapeRobotPool
checkoutRobotService
in interface TapeRobotPool
InterruptedException
public TapeRobotService checkoutRobotService(long timeout, TimeUnit unit) throws InterruptedException
TapeRobotPool
checkoutRobotService
in interface TapeRobotPool
InterruptedException
public TapeDriveService checkoutDriveService(Integer driveIndex)
TapeDrivePool
checkoutDriveService
in interface TapeDrivePool
public void pushRobotService(TapeRobotService tapeRobotService) throws InterruptedException
TapeRobotPool
pushRobotService
in interface TapeRobotPool
InterruptedException
public void pushDriveService(TapeDriveService tapeDriveService)
TapeDrivePool
pushDriveService
in interface TapeDrivePool
public Set<Map.Entry<Integer,TapeDriveService>> drives()
drives
in interface TapeDrivePool
public String getLibraryIdentifier()
getLibraryIdentifier
in interface TapeRobotPool
public TapeCatalogService getTapeCatalogService()
getTapeCatalogService
in interface TapeRobotPool
Copyright © 2019 Vitam. All rights reserved.