use of com.emc.storageos.storagedriver.AbstractStorageDriver in project coprhd-controller by CoprHD.
the class ExternalBlockStorageDevice method getDriver.
public synchronized BlockStorageDriver getDriver(String driverType) {
// look up driver
BlockStorageDriver storageDriver = blockDrivers.get(driverType);
if (storageDriver != null) {
return storageDriver;
} else {
// init driver
AbstractStorageDriver driver = drivers.get(driverType);
if (driver == null) {
_log.error("No driver entry defined for device type: {} . ", driverType);
throw ExternalDeviceException.exceptions.noDriverDefinedForDevice(driverType);
}
init(driver);
blockDrivers.put(driverType, (BlockStorageDriver) driver);
return (BlockStorageDriver) driver;
}
}
Aggregations