Package org.datanucleus.store.autostart
Class MetaDataAutoStarter
- java.lang.Object
-
- org.datanucleus.store.autostart.AbstractAutoStartMechanism
-
- org.datanucleus.store.autostart.MetaDataAutoStarter
-
- All Implemented Interfaces:
AutoStartMechanism
public class MetaDataAutoStarter extends AbstractAutoStartMechanism
An auto-starter mechanism that uses a defined list of metadata files to be loaded at startup.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.datanucleus.store.autostart.AutoStartMechanism
AutoStartMechanism.Mode
-
-
Field Summary
Fields Modifier and Type Field Description protected Collection<StoreData>
classes
protected ClassLoaderResolver
clr
protected String
metaDataFiles
Names of the metadata files to start with (comma-separated).protected StoreManager
storeMgr
-
Fields inherited from class org.datanucleus.store.autostart.AbstractAutoStartMechanism
mode, open
-
-
Constructor Summary
Constructors Constructor Description MetaDataAutoStarter(StoreManager storeMgr, ClassLoaderResolver clr)
Constructor, taking the names of the metadata to use.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addClass(StoreData data)
Method to add a class to the starter.void
deleteAllClasses()
Method to remove all classes from the starter.void
deleteClass(String className)
Method to remove a class from the starter.Collection<StoreData>
getAllClassData()
Accessor for all auto start data for this starter.String
getStorageDescription()
Method to give a descriptive name for the starter process.
-
-
-
Field Detail
-
metaDataFiles
protected String metaDataFiles
Names of the metadata files to start with (comma-separated).
-
storeMgr
protected StoreManager storeMgr
-
clr
protected ClassLoaderResolver clr
-
classes
protected Collection<StoreData> classes
-
-
Constructor Detail
-
MetaDataAutoStarter
public MetaDataAutoStarter(StoreManager storeMgr, ClassLoaderResolver clr)
Constructor, taking the names of the metadata to use.- Parameters:
storeMgr
- The StoreManager managing the store that we are auto-starting.clr
- The ClassLoaderResolver
-
-
Method Detail
-
getAllClassData
public Collection<StoreData> getAllClassData() throws DatastoreInitialisationException
Accessor for all auto start data for this starter.- Returns:
- The class auto start data. Collection of StoreData elements
- Throws:
DatastoreInitialisationException
- If an error occurs in datastore init
-
addClass
public void addClass(StoreData data)
Method to add a class to the starter.- Parameters:
data
- The store data to add
-
deleteClass
public void deleteClass(String className)
Method to remove a class from the starter.- Parameters:
className
- The name of the class to remove.
-
deleteAllClasses
public void deleteAllClasses()
Method to remove all classes from the starter.
-
getStorageDescription
public String getStorageDescription()
Method to give a descriptive name for the starter process.- Returns:
- Description of the starter process.
-
-