org.datanucleus.store.autostart
Class AbstractAutoStartMechanism

java.lang.Object
  extended by org.datanucleus.store.autostart.AbstractAutoStartMechanism
All Implemented Interfaces:
AutoStartMechanism
Direct Known Subclasses:
ClassesAutoStarter, MetaDataAutoStarter, XMLAutoStarter

public abstract class AbstractAutoStartMechanism
extends java.lang.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
protected static Localiser LOCALISER
          Localisation of messages
protected  AutoStartMechanism.Mode mode
          AutoStart "mode"
protected  boolean open
          Flag whether the starter is open.
 
Constructor Summary
AbstractAutoStartMechanism()
          Constructor.
 
Method Summary
 void close()
          Closes a transaction for writing (add/delete) classes to the auto start mechanism.
 AutoStartMechanism.Mode getMode()
          Accessor for the mode of operation
 boolean isOpen()
          Whether it's open for writing (add/delete) classes to the auto start mechanism
 void 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

LOCALISER

protected static final Localiser LOCALISER
Localisation of messages


mode

protected AutoStartMechanism.Mode mode
AutoStart "mode"


open

protected boolean open
Flag whether the starter is open.

Constructor Detail

AbstractAutoStartMechanism

public AbstractAutoStartMechanism()
Constructor.

Method Detail

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


Copyright © 2010. All Rights Reserved.