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 AutoStartMechanism
AutoStartMechanism.Mode -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected AutoStartMechanism.ModeAutoStart "mode"protected booleanFlag whether the starter is open. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Closes a transaction for writing (add/delete) classes to the auto start mechanism.getMode()Accessor for the mode of operationbooleanisOpen()Whether it's open for writing (add/delete) classes to the auto start mechanismvoidopen()Starts a transaction for writting (add/delete) classes to the auto start mechanism.voidMutator for the mode of operationMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface 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:
getModein interfaceAutoStartMechanism- Returns:
- The mode of operation
-
setMode
Mutator for the mode of operation- Specified by:
setModein 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:
openin interfaceAutoStartMechanism
-
isOpen
public boolean isOpen()Whether it's open for writing (add/delete) classes to the auto start mechanism- Specified by:
isOpenin 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:
closein interfaceAutoStartMechanism
-