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.
  • Field Details

    • mode

      protected AutoStartMechanism.Mode mode
      AutoStart "mode"
    • open

      protected boolean open
      Flag whether the starter is open.
  • Constructor Details

    • AbstractAutoStartMechanism

      public AbstractAutoStartMechanism()
      Constructor.
  • Method Details

    • getMode

      public AutoStartMechanism.Mode getMode()
      Accessor for the mode of operation
      Specified by:
      getMode in interface AutoStartMechanism
      Returns:
      The mode of operation
    • setMode

      public void setMode(AutoStartMechanism.Mode mode)
      Mutator for the mode of operation
      Specified by:
      setMode in interface AutoStartMechanism
      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 interface AutoStartMechanism
    • isOpen

      public boolean isOpen()
      Whether it's open for writing (add/delete) classes to the auto start mechanism
      Specified by:
      isOpen in interface AutoStartMechanism
      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 interface AutoStartMechanism