public interface AutoStartMechanism
If the user changes their persistence definition a problem can occur when starting up DataNucleus. DataNucleus loads up its existing data from a repository (e.g the table "NUCLEUS_TABLES" for SchemaTableAutoStarter) and finds that a table/class required by the repository data no longer exists. There are 3 options for what DataNucleus will do in this situation.
Implementations must have a public constructor taking the arguments StoreManager
and
ClassLoaderResolver
Modifier and Type | Interface and Description |
---|---|
static class |
AutoStartMechanism.Mode |
Modifier and Type | Method and Description |
---|---|
void |
addClass(StoreData data)
Method to add a class/field (with its data) to the currently-supported list.
|
void |
close()
Closes a transaction for writing (add/delete) classes to the auto start mechanism.
|
void |
deleteAllClasses()
Method to delete all classes that are currently listed as supported in
the internal storage.
|
void |
deleteClass(String name)
Method to delete a class/field that is currently listed as supported in
the internal storage.
|
Collection<StoreData> |
getAllClassData()
Accessor for the data for the classes that are currently auto started.
|
AutoStartMechanism.Mode |
getMode()
Accessor for the mode of operation.
|
String |
getStorageDescription()
Utility to return a description of the storage for this mechanism.
|
boolean |
isOpen()
Whether it's open for writing (add/delete) classes to the auto start mechanism.
|
void |
open()
Starts a transaction for writing (add/delete) classes to the auto start mechanism.
|
void |
setMode(AutoStartMechanism.Mode mode)
Mutator for the mode of operation.
|
AutoStartMechanism.Mode getMode()
void setMode(AutoStartMechanism.Mode mode)
mode
- The mode of operationCollection<StoreData> getAllClassData() throws DatastoreInitialisationException
StoreData
elementsDatastoreInitialisationException
- If there is an error initialising the datastorevoid open()
void close()
boolean isOpen()
void addClass(StoreData data)
data
- The data for the class.void deleteClass(String name)
name
- The name of the class/fieldvoid deleteAllClasses()
String getStorageDescription()
Copyright © 2019. All rights reserved.