org.datanucleus.store.autostart
Class ClassesAutoStarter

java.lang.Object
  extended by org.datanucleus.store.autostart.AbstractAutoStartMechanism
      extended by org.datanucleus.store.autostart.ClassesAutoStarter
All Implemented Interfaces:
AutoStartMechanism

public class ClassesAutoStarter
extends AbstractAutoStartMechanism

An auto-starter mechanism that uses a defined list of classes to be loaded at start.

Version:
$Revision: 1.13 $

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.datanucleus.store.autostart.AutoStartMechanism
AutoStartMechanism.Mode
 
Field Summary
protected  java.lang.String classNames
          Names of the classes to start with.
 
Fields inherited from class org.datanucleus.store.autostart.AbstractAutoStartMechanism
LOCALISER, mode, open
 
Constructor Summary
ClassesAutoStarter(StoreManager storeMgr, ClassLoaderResolver clr)
          Constructor, taking the names of the classes to use.
 
Method Summary
 void addClass(StoreData data)
          Method to add a class to the starter.
 void deleteAllClasses()
          Method to remove all classes from the starter.
 void deleteClass(java.lang.String className)
          Method to remove a class from the starter
 java.util.Collection getAllClassData()
          Accessor for all auto start data for this starter.
 java.lang.String getStorageDescription()
          Method to give a descriptive name for the starter process.
 
Methods inherited from class org.datanucleus.store.autostart.AbstractAutoStartMechanism
close, getMode, isOpen, open, setMode
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

classNames

protected java.lang.String classNames
Names of the classes to start with.

Constructor Detail

ClassesAutoStarter

public ClassesAutoStarter(StoreManager storeMgr,
                          ClassLoaderResolver clr)
Constructor, taking the names of the classes to use.

Parameters:
storeMgr - The StoreManager managing the store that we are auto-starting.
clr - The ClassLoaderResolver
Method Detail

getAllClassData

public java.util.Collection getAllClassData()
                                     throws DatastoreInitialisationException
Accessor for all auto start data for this starter.

Returns:
The class auto start data. Collection of StoreData elements
Throws:
DatastoreInitialisationException

addClass

public void addClass(StoreData data)
Method to add a class to the starter.

Parameters:
data - The store data to add

deleteClass

public void deleteClass(java.lang.String className)
Method to remove a class from the starter

Parameters:
className - The name of the class to remove.

deleteAllClasses

public void deleteAllClasses()
Method to remove all classes from the starter.


getStorageDescription

public java.lang.String getStorageDescription()
Method to give a descriptive name for the starter process.

Returns:
Description of the starter process.


Copyright © 2011. All Rights Reserved.