Package org.datanucleus.store.autostart
Class AbstractAutoStartMechanism
- java.lang.Object
-
- org.datanucleus.store.autostart.AbstractAutoStartMechanism
-
- All Implemented Interfaces:
AutoStartMechanism
- Direct Known Subclasses:
ClassesAutoStarter
,MetaDataAutoStarter
public abstract class AbstractAutoStartMechanism extends Object implements AutoStartMechanism
Abstract representation of an autostart mechanism.
-
-
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 AutoStartMechanism.Mode
mode
AutoStart "mode"protected boolean
open
Flag whether the starter is open.
-
Constructor Summary
Constructors Constructor Description AbstractAutoStartMechanism()
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Closes a transaction for writing (add/delete) classes to the auto start mechanism.AutoStartMechanism.Mode
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
setMode(AutoStartMechanism.Mode mode)
Mutator for the mode of operation-
Methods 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 Detail
-
mode
protected AutoStartMechanism.Mode mode
AutoStart "mode"
-
open
protected boolean open
Flag whether the starter is open.
-
-
Method Detail
-
getMode
public AutoStartMechanism.Mode getMode()
Accessor for the mode of operation- Specified by:
getMode
in interfaceAutoStartMechanism
- Returns:
- The mode of operation
-
setMode
public void setMode(AutoStartMechanism.Mode mode)
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
-
-