Package fr.gouv.vitam.storage.driver
Class AbstractDriver
java.lang.Object
fr.gouv.vitam.storage.driver.AbstractDriver
- All Implemented Interfaces:
VitamAutoCloseable
,Driver
,AutoCloseable
- Direct Known Subclasses:
DriverImpl
,FakeDriverImpl
This class must be the reference to create new drivers implementation compatible with vitam
-
Field Summary
Modifier and TypeFieldDescriptionprotected final Map<String,
VitamClientFactoryInterface<? extends AbstractConnection>> -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected abstract VitamClientFactoryInterface<? extends AbstractConnection>
addInternalOfferAsFactory
(StorageOffer offer, Properties parameters) This method must be implemented in the final Driver Implementation to add the ClientFactory to the driverfinal boolean
addOffer
(StorageOffer offer, Properties parameters) Add one offer to the Driver (from DriverManager) The driver MUST provide a way to check the availability of the storage offer based on storage offer and configuration parameters.void
close()
final boolean
Return true if offer exists for the driver, false elseboolean
isStorageOfferAvailable
(String offerId) The driver MUST provide a way to check the availability of the storage offer Id name.final boolean
removeOffer
(String offer) Remove one offer from the Driver (from DriverManager)Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface fr.gouv.vitam.storage.driver.Driver
connect, getMajorVersion, getMinorVersion, getName
-
Field Details
-
connectionFactories
protected final Map<String,VitamClientFactoryInterface<? extends AbstractConnection>> connectionFactories
-
-
Constructor Details
-
AbstractDriver
public AbstractDriver()
-
-
Method Details
-
isStorageOfferAvailable
Description copied from interface:Driver
The driver MUST provide a way to check the availability of the storage offer Id name.- Specified by:
isStorageOfferAvailable
in interfaceDriver
- Parameters:
offerId
- the offerId name- Returns:
- MUST return true if the distant offer service is available to accept further requests, false otherwise, including if the offer is not yet added
- Throws:
StorageDriverException
- if any problem occurs during request
-
addOffer
Description copied from interface:Driver
Add one offer to the Driver (from DriverManager) The driver MUST provide a way to check the availability of the storage offer based on storage offer and configuration parameters. For example it can be used to pass user and password properties in for authentication.The parameters argument can also be used to pass arbitrary string tag/value pairs as connection arguments.
-
addInternalOfferAsFactory
protected abstract VitamClientFactoryInterface<? extends AbstractConnection> addInternalOfferAsFactory(StorageOffer offer, Properties parameters) This method must be implemented in the final Driver Implementation to add the ClientFactory to the driver- Parameters:
offer
-parameters
-- Returns:
- true if added
-
removeOffer
Description copied from interface:Driver
Remove one offer from the Driver (from DriverManager)- Specified by:
removeOffer
in interfaceDriver
- Returns:
- True if the offer was removed, false if not existing
-
hasOffer
Description copied from interface:Driver
Return true if offer exists for the driver, false else -
close
public void close()- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceVitamAutoCloseable
-