Package org.datanucleus.store.autostart
Class ClassesAutoStarter
java.lang.Object
org.datanucleus.store.autostart.AbstractAutoStartMechanism
org.datanucleus.store.autostart.ClassesAutoStarter
- All Implemented Interfaces:
AutoStartMechanism
An auto-starter mechanism that uses a defined list of classes to be loaded at start.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.datanucleus.store.autostart.AutoStartMechanism
AutoStartMechanism.Mode
-
Field Summary
FieldsFields inherited from class org.datanucleus.store.autostart.AbstractAutoStartMechanism
mode, open
-
Constructor Summary
ConstructorsConstructorDescriptionClassesAutoStarter
(StoreManager storeMgr, ClassLoaderResolver clr) Constructor, taking the names of the classes to use. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Method to add a class to the starter.void
Method to remove all classes from the starter.void
deleteClass
(String className) Method to remove a class from the starterAccessor for all auto start data for this starter.Method to give a descriptive name for the starter process.
-
Field Details
-
classNames
Names of the classes to start with.
-
-
Constructor Details
-
ClassesAutoStarter
Constructor, taking the names of the classes to use.- Parameters:
storeMgr
- The StoreManager managing the store that we are auto-starting.clr
- The ClassLoaderResolver
-
-
Method Details
-
getAllClassData
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
Method to add a class to the starter.- Parameters:
data
- The store data to add
-
deleteClass
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
Method to give a descriptive name for the starter process.- Returns:
- Description of the starter process.
-