Overview | Package | Class | Tree | Serialized | Deprecated | Index | Help
| SolarMetric Kodo JDO 2.4.3 generated on March 27 2003
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.solarmetric.kodo.runtime
Class PersistenceManagerFactoryImpl

    java.lang.Object
      |
      +--com.solarmetric.kodo.runtime.PersistenceManagerFactoryImpl

All Implemented Interfaces:
  PersistenceManagerFactory, Serializable

Direct Known Subclasses:
  JDBCPersistenceManagerFactory

public abstract class PersistenceManagerFactoryImpl
extends Object
implements PersistenceManagerFactory

Abstract implementation of the `PersistenceManagerFactory` that must be subclassed for a specific runtime.

See Also:
  Serialized Form

Constructor Summary
`PersistenceManagerFactoryImpl(Configuration config)` Constructor.

Method Summary
`void` | `close()` API extension.
`protected void` | `configurePersistenceManager(PersistenceManager pm)` Configures the given PersistenceManager with the current factory option settings.
`protected PersistenceManagerImpl` | `findPersistenceManager(String user, String pass)` Find a pooled PersistenceManager, or return null if none.
`protected void` | `freeze()` Freezes the configuration of this factory.
`Configuration` | `getConfiguration()` Return the configuration for this factory.
`String` | `getConnectionDriverName()`
`Object` | `getConnectionFactory()`
`Object` | `getConnectionFactory2()`
`String` | `getConnectionFactory2Name()`
`String` | `getConnectionFactoryName()`
`String` | `getConnectionPassword()`
`String` | `getConnectionURL()`
`String` | `getConnectionUserName()`
`boolean` | `getIgnoreCache()`
`int` | `getMaxPool()`
`int` | `getMinPool()`
`int` | `getMsWait()`
`boolean` | `getMultithreaded()`
`boolean` | `getNontransactionalRead()`
`boolean` | `getNontransactionalWrite()`
`boolean` | `getOptimistic()`
`PersistenceManager` | `getPersistenceManager()`
`PersistenceManager` | `getPersistenceManager(String user, String pass)`
`Properties` | `getProperties()`
`boolean` | `getRestoreValues()`
`boolean` | `getRetainValues()`
`abstract String` | `getVersionInformation()` Return a string describing this factory version, such as "JDBC Enterprise".
`protected void` | `lock()` Synchronizes on an internal lock.
`protected Object` | `newConnectionFactory()` Instantiate a connection factory from the current configuration.
`protected PersistenceManagerImpl` | `newPersistenceManager(String user, String pass, StoreManager sm)` Return a PersistenceManager configured with the proper settings.
`protected abstract StoreManager` | `newStoreManager()` Return a new StoreManager for this runtime.
`protected void` | `readObject()` Subclasses must implement the `readObject` method for deserialization to read their non-transient data (or use `defaultReadObject`) and then invoke this method, which will perform the necessary setup.
`protected void` | `removeUnsupportedOptions(Collection options)` Remove the options not supported by this runtime from the given collection.
`void` | `setConnectionDriverName(String val)`
`void` | `setConnectionFactory(Object val)`
`void` | `setConnectionFactory2(Object val)`
`void` | `setConnectionFactory2Name(String val)`
`void` | `setConnectionFactoryName(String val)`
`void` | `setConnectionPassword(String val)`
`void` | `setConnectionURL(String val)`
`void` | `setConnectionUserName(String val)`
`void` | `setIgnoreCache(boolean val)`
`void` | `setMaxPool(int val)`
`void` | `setMinPool(int val)`
`void` | `setMsWait(int val)`
`void` | `setMultithreaded(boolean val)`
`void` | `setNontransactionalRead(boolean val)`
`void` | `setNontransactionalWrite(boolean val)`
`void` | `setOptimistic(boolean val)`
`void` | `setRestoreValues(boolean val)`
`void` | `setRetainValues(boolean val)`
`protected void` | `setup()` Setup transient state used by this factory based on the current configuration, which will subsequenty be locked down.
`Collection` | `supportedOptions()`
`protected void` | `unlock()` Releases the internal lock.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### PersistenceManagerFactoryImpl

    public PersistenceManagerFactoryImpl(Configuration config)

  Constructor. Configuration must be provided on construction.

Method Detail

### getConfiguration

    public Configuration getConfiguration()

  Return the configuration for this factory.

### getPersistenceManager

    public PersistenceManager getPersistenceManager()

  Specified by:
    `getPersistenceManager` in interface `PersistenceManagerFactory`

### getPersistenceManager

    public PersistenceManager getPersistenceManager(String user,
                                                    String pass)

  Specified by:
    `getPersistenceManager` in interface `PersistenceManagerFactory`

### getProperties

    public Properties getProperties()

  Specified by:
    `getProperties` in interface `PersistenceManagerFactory`

### supportedOptions

    public Collection supportedOptions()

  Specified by:
    `supportedOptions` in interface `PersistenceManagerFactory`

### getConnectionUserName

    public String getConnectionUserName()

  Specified by:
    `getConnectionUserName` in interface `PersistenceManagerFactory`

### setConnectionUserName

    public void setConnectionUserName(String val)

  Specified by:
    `setConnectionUserName` in interface `PersistenceManagerFactory`

### getConnectionPassword

    public String getConnectionPassword()

### setConnectionPassword

    public void setConnectionPassword(String val)

  Specified by:
    `setConnectionPassword` in interface `PersistenceManagerFactory`

### getConnectionURL

    public String getConnectionURL()

  Specified by:
    `getConnectionURL` in interface `PersistenceManagerFactory`

### setConnectionURL

    public void setConnectionURL(String val)

  Specified by:
    `setConnectionURL` in interface `PersistenceManagerFactory`

### getConnectionDriverName

    public String getConnectionDriverName()

  Specified by:
    `getConnectionDriverName` in interface `PersistenceManagerFactory`

### setConnectionDriverName

    public void setConnectionDriverName(String val)

  Specified by:
    `setConnectionDriverName` in interface `PersistenceManagerFactory`

### getConnectionFactoryName

    public String getConnectionFactoryName()

  Specified by:
    `getConnectionFactoryName` in interface `PersistenceManagerFactory`

### setConnectionFactoryName

    public void setConnectionFactoryName(String val)

  Specified by:
    `setConnectionFactoryName` in interface `PersistenceManagerFactory`

### getConnectionFactory

    public Object getConnectionFactory()

  Specified by:
    `getConnectionFactory` in interface `PersistenceManagerFactory`

### setConnectionFactory

    public void setConnectionFactory(Object val)

  Specified by:
    `setConnectionFactory` in interface `PersistenceManagerFactory`

### getConnectionFactory2Name

    public String getConnectionFactory2Name()

  Specified by:
    `getConnectionFactory2Name` in interface `PersistenceManagerFactory`

### setConnectionFactory2Name

    public void setConnectionFactory2Name(String val)

  Specified by:
    `setConnectionFactory2Name` in interface `PersistenceManagerFactory`

### getConnectionFactory2

    public Object getConnectionFactory2()

  Specified by:
    `getConnectionFactory2` in interface `PersistenceManagerFactory`

### setConnectionFactory2

    public void setConnectionFactory2(Object val)

  Specified by:
    `setConnectionFactory2` in interface `PersistenceManagerFactory`

### getOptimistic

    public boolean getOptimistic()

  Specified by:
    `getOptimistic` in interface `PersistenceManagerFactory`

### setOptimistic

    public void setOptimistic(boolean val)

  Specified by:
    `setOptimistic` in interface `PersistenceManagerFactory`

### getRetainValues

    public boolean getRetainValues()

  Specified by:
    `getRetainValues` in interface `PersistenceManagerFactory`

### setRetainValues

    public void setRetainValues(boolean val)

  Specified by:
    `setRetainValues` in interface `PersistenceManagerFactory`

### getRestoreValues

    public boolean getRestoreValues()

  Specified by:
    `getRestoreValues` in interface `PersistenceManagerFactory`

### setRestoreValues

    public void setRestoreValues(boolean val)

  Specified by:
    `setRestoreValues` in interface `PersistenceManagerFactory`

### getNontransactionalRead

    public boolean getNontransactionalRead()

  Specified by:
    `getNontransactionalRead` in interface `PersistenceManagerFactory`

### setNontransactionalRead

    public void setNontransactionalRead(boolean val)

  Specified by:
    `setNontransactionalRead` in interface `PersistenceManagerFactory`

### getNontransactionalWrite

    public boolean getNontransactionalWrite()

  Specified by:
    `getNontransactionalWrite` in interface `PersistenceManagerFactory`

### setNontransactionalWrite

    public void setNontransactionalWrite(boolean val)

  Specified by:
    `setNontransactionalWrite` in interface `PersistenceManagerFactory`

### getIgnoreCache

    public boolean getIgnoreCache()

  Specified by:
    `getIgnoreCache` in interface `PersistenceManagerFactory`

### setIgnoreCache

    public void setIgnoreCache(boolean val)

  Specified by:
    `setIgnoreCache` in interface `PersistenceManagerFactory`

### getMultithreaded

    public boolean getMultithreaded()

  Specified by:
    `getMultithreaded` in interface `PersistenceManagerFactory`

### setMultithreaded

    public void setMultithreaded(boolean val)

  Specified by:
    `setMultithreaded` in interface `PersistenceManagerFactory`

### getMaxPool

    public int getMaxPool()

  Specified by:
    `getMaxPool` in interface `PersistenceManagerFactory`

### setMaxPool

    public void setMaxPool(int val)

  Specified by:
    `setMaxPool` in interface `PersistenceManagerFactory`

### getMinPool

    public int getMinPool()

  Specified by:
    `getMinPool` in interface `PersistenceManagerFactory`

### setMinPool

    public void setMinPool(int val)

  Specified by:
    `setMinPool` in interface `PersistenceManagerFactory`

### getMsWait

    public int getMsWait()

  Specified by:
    `getMsWait` in interface `PersistenceManagerFactory`

### setMsWait

    public void setMsWait(int val)

  Specified by:
    `setMsWait` in interface `PersistenceManagerFactory`

### getVersionInformation

    public abstract String getVersionInformation()

  Return a string describing this factory version, such as "JDBC Enterprise".

### newStoreManager

    protected abstract StoreManager newStoreManager()

  Return a new StoreManager for this runtime. Note that the instance returned here may be wrapped before being passed to the `newPersistenceManager(java.lang.String, java.lang.String, com.solarmetric.kodo.runtime.StoreManager)` method. However, the `PersistenceManagerImpl.getStoreManager()` method will return the original native store manager.

### newConnectionFactory

    protected Object newConnectionFactory()

  Instantiate a connection factory from the current configuration. This method returns null by default.

### findPersistenceManager

    protected PersistenceManagerImpl findPersistenceManager(String user,
                                                            String pass)

  Find a pooled PersistenceManager, or return null if none. Returns null by default. This method will be called before `newStoreManager()` so that factory subclasses implementing pooling can return a matching manager before a new `StoreManager` is created.

### newPersistenceManager

    protected PersistenceManagerImpl newPersistenceManager(String user,
                                                           String pass,
                                                           StoreManager sm)

  Return a PersistenceManager configured with the proper settings. By default, this method constructs and configures a new PersistenceManagerImpl of the class set for this factory.

### setup

    protected void setup()

  Setup transient state used by this factory based on the current configuration, which will subsequenty be locked down. This method will be called before the first PersistenceManager is requested, and will be re-called each time the factory is deserialized into a JVM that has no configuration for this data store.

### readObject

    protected void readObject()

  Subclasses must implement the `readObject` method for deserialization to read their non-transient data (or use `defaultReadObject`) and then invoke this method, which will perform the necessary setup.

### removeUnsupportedOptions

    protected void removeUnsupportedOptions(Collection options)

  Remove the options not supported by this runtime from the given collection. The Collection will initially consist of the following options:
  - javax.jdo.option.TransientTransactional
  - javax.jdo.option.NontransactionalRead
  - javax.jdo.option.NontransactionalWrite
  - javax.jdo.option.RetainValues
  - javax.jdo.option.RestoreValues
  - javax.jdo.option.Optimistic
  - javax.jdo.option.ApplicationIdentity
  - javax.jdo.option.DatastoreIdentity
  - javax.jdo.option.ArrayList
  - javax.jdo.option.HashMap
  - javax.jdo.option.Hashtable
  - javax.jdo.option.LinkedList
  - javax.jdo.option.TreeMap
  - javax.jdo.option.TreeSet
  - javax.jdo.option.Vector
  - javax.jdo.option.Map
  - javax.jdo.option.List
  - javax.jdo.option.Array
  - javax.jdo.option.NullCollection
  - javax.jdo.query.JDOQL

### configurePersistenceManager

    protected void configurePersistenceManager(PersistenceManager pm)

  Configures the given PersistenceManager with the current factory option settings.

### lock

    protected void lock()

  Synchronizes on an internal lock. Make sure to call `unlock()` in a finally clause of the same method.

### unlock

    protected void unlock()

  Releases the internal lock.

### freeze

    protected void freeze()

  Freezes the configuration of this factory.

### close

    public void close()

  API extension. Closes the PersistenceManagerFactory, freeing any resources needed by this factory. After this method is invoked, the factory and associated PersistenceManagers should no longer be used.

Overview | Package | Class | Tree | Serialized | Deprecated | Index | Help
| SolarMetric Kodo JDO 2.4.3 generated on March 27 2003
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright 2001,2002 SolarMetric, Inc. All Rights Reserved.