Package org.datanucleus.store.autostart
Class AbstractAutoStartMechanism
java.lang.Object
org.datanucleus.store.autostart.AbstractAutoStartMechanism
- All Implemented Interfaces:
AutoStartMechanism
- Direct Known Subclasses:
ClassesAutoStarter
,MetaDataAutoStarter
Abstract representation of an autostart mechanism.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.datanucleus.store.autostart.AutoStartMechanism
AutoStartMechanism.Mode
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected AutoStartMechanism.Mode
AutoStart "mode"protected boolean
Flag whether the starter is open. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Closes a transaction for writing (add/delete) classes to the auto start mechanism.getMode()
Accessor for the mode of operationboolean
isOpen()
Whether it's open for writing (add/delete) classes to the auto start mechanismvoid
open()
Starts a transaction for writting (add/delete) classes to the auto start mechanism.void
Mutator for the mode of operationMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.datanucleus.store.autostart.AutoStartMechanism
addClass, deleteAllClasses, deleteClass, getAllClassData, getStorageDescription
-
Field Details
-
mode
AutoStart "mode" -
open
protected boolean openFlag whether the starter is open.
-
-
Constructor Details
-
AbstractAutoStartMechanism
public AbstractAutoStartMechanism()Constructor.
-
-
Method Details
-
getMode
Accessor for the mode of operation- Specified by:
getMode
in interfaceAutoStartMechanism
- Returns:
- The mode of operation
-
setMode
Mutator for the mode of operation- Specified by:
setMode
in interfaceAutoStartMechanism
- Parameters:
mode
- The mode of operation
-
open
public void open()Starts a transaction for writting (add/delete) classes to the auto start mechanism. Simply sets the open flag to true.- Specified by:
open
in interfaceAutoStartMechanism
-
isOpen
public boolean isOpen()Whether it's open for writing (add/delete) classes to the auto start mechanism- Specified by:
isOpen
in interfaceAutoStartMechanism
- Returns:
- whether this is open for writing
-
close
public void close()Closes a transaction for writing (add/delete) classes to the auto start mechanism. Set the open flag to false.- Specified by:
close
in interfaceAutoStartMechanism
-