org.objectweb.speedo
Class Speedo

java.lang.Object
  extended byorg.objectweb.speedo.Speedo
All Implemented Interfaces:
javax.jdo.datastore.DataStoreCache, javax.jdo.PersistenceManagerFactory, ProxyManagerFactory, java.io.Serializable

public class Speedo
extends java.lang.Object
implements javax.jdo.PersistenceManagerFactory, ProxyManagerFactory

This class is a client helper which permits to create a new speedo PersistentManagerFactory. Due to the JDO constraint the persistence manager factory implementation must have a public empty contructor. But the use of the fractal component (www.objectweb.org/fractal) needs to use a fractal implementation to initialize components. Then this class is an implementation of the PersistentManagerFactory interface which delegates all calls on a persistent manager factory delegate. The constructor of this class make the components creation and their initialization via Julia (fractal implementation).

Author:
S.Chassande-Barrioz
See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class javax.jdo.datastore.DataStoreCache
javax.jdo.datastore.DataStoreCache.EmptyDataStoreCache
 
Field Summary
static java.lang.String CONNECTION_POOL_PATH
           
static java.lang.String CONNECTION_SPEC_FACTORY
           
static java.lang.String DEPENDENCY_GRAPH_PATH
           
static java.lang.String HTML_JMX_AGENT_PATH
           
static java.lang.String JMX_AGENT_PATH
           
static java.lang.String JORM_FACTORY_PATH
           
static java.lang.String MEMORY_CACHE_PATH
           
static java.lang.String MONOLOG_FACTORY_PATH
           
static java.lang.String PM_POOL_PATH
           
static java.lang.String PMF_PATH
           
static java.lang.String PRIMITIVE_MAPPER_PATH
           
static java.lang.String QUERY_CACHE_PATH
           
static java.lang.String QUERY_MANAGER
           
 
Constructor Summary
Speedo()
           
Speedo(java.util.Map props)
          It creates and initializes a real SpeedoProxyManagerFactory with Julia (Fractal implementation).
 
Method Summary
 void addInstanceLifecycleListener(javax.jdo.listener.InstanceLifecycleListener arg0, java.lang.Class[] arg1)
           
 void bindPM2Thread(ProxyManager pm)
          Ask to the PMS to bind a particular PM to the Thread.
static void clearInstances()
           
 void close()
           
 void evict(java.lang.Object arg0)
           
 void evictAll()
           
 void evictAll(java.lang.Class arg0, boolean arg1)
           
 void evictAll(java.util.Collection arg0)
           
 void evictAll(java.lang.Object[] arg0)
           
 java.lang.Object getConcurrencyManagerComponent()
           
 java.lang.String getConnectionDriverName()
           
 java.lang.Object getConnectionFactory()
           
 java.lang.Object getConnectionFactory2()
           
 java.lang.String getConnectionFactory2Name()
           
 java.lang.String getConnectionFactoryName()
           
 java.lang.String getConnectionURL()
           
 java.lang.String getConnectionUserName()
           
 javax.jdo.datastore.DataStoreCache getDataStoreCache()
           
 javax.jdo.PersistenceManagerFactory getDelegate()
           
 org.objectweb.perseus.dependency.api.DependencyGraph getDependencyGraph()
           
 boolean getIgnoreCache()
           
 java.lang.String getMapping()
           
static byte getMappingStructure(java.lang.String strval)
           
static java.lang.String getMappingStructureString(byte b)
           
 java.util.Collection getMemoryCacheEntries()
           
 boolean getMultithreaded()
           
 boolean getNontransactionalRead()
           
 boolean getNontransactionalWrite()
           
 boolean getOptimistic()
           
 javax.jdo.PersistenceManager getPersistenceManager()
           
 javax.jdo.PersistenceManager getPersistenceManager(java.lang.String s, java.lang.String s1)
           
static javax.jdo.PersistenceManagerFactory getPersistenceManagerFactory(java.util.Map m)
           
static javax.jdo.PersistenceManagerFactory getPersistenceManagerFactory(java.util.Properties props)
           
 ProxyManagerFactory getPMFComponent()
           
 java.util.Properties getProperties()
           
 boolean getRestoreValues()
           
 boolean getRetainValues()
           
 SequenceManager getSequenceManager()
          Get the sequence manager associated to the pmf.
 void init(org.objectweb.fractal.api.Component speedo, java.util.Map pmfProps)
           
 boolean isClosed()
           
 ProxyManager lookup()
          Finds in the associated ProxyManagerSwitch a ProxyManager managed by the ProxyManagerFactory.
 void pin(java.lang.Object arg0)
           
 void pinAll(java.lang.Class arg0, boolean arg1)
           
 void pinAll(java.util.Collection arg0)
           
 void pinAll(java.lang.Object[] arg0)
           
 void proxyManagerClosed(ProxyManager pr)
          Indicates when a PM has been closed.
 void removeInstanceLifecycleListener(javax.jdo.listener.InstanceLifecycleListener arg0)
           
 void setConnectionDriverName(java.lang.String s)
           
 void setConnectionFactory(java.lang.Object o)
           
 void setConnectionFactory2(java.lang.Object o)
           
 void setConnectionFactory2Name(java.lang.String s)
           
 void setConnectionFactoryName(java.lang.String s)
           
 void setConnectionPassword(java.lang.String s)
           
 void setConnectionURL(java.lang.String s)
           
 void setConnectionUserName(java.lang.String s)
           
 void setIgnoreCache(boolean b)
           
 void setMapping(java.lang.String arg0)
           
 void setMultithreaded(boolean b)
           
 void setNontransactionalRead(boolean b)
           
 void setNontransactionalWrite(boolean b)
           
 void setOptimistic(boolean b)
           
 void setRestoreValues(boolean b)
           
 void setRetainValues(boolean b)
           
 void setSequenceManager(SequenceManager sequenceManager)
          Set the sequence manager.
 java.util.Collection supportedOptions()
           
 void unbindPM()
          It call pms.unbind(this) in order to unbind a ProxyManager managed by this ProxyManagerFactory, from the thread.
 void unpin(java.lang.Object arg0)
           
 void unpinAll(java.lang.Class arg0, boolean arg1)
           
 void unpinAll(java.util.Collection arg0)
           
 void unpinAll(java.lang.Object[] arg0)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONNECTION_SPEC_FACTORY

public static final java.lang.String CONNECTION_SPEC_FACTORY
See Also:
Constant Field Values

PM_POOL_PATH

public static final java.lang.String PM_POOL_PATH
See Also:
Constant Field Values

MEMORY_CACHE_PATH

public static final java.lang.String MEMORY_CACHE_PATH
See Also:
Constant Field Values

DEPENDENCY_GRAPH_PATH

public static final java.lang.String DEPENDENCY_GRAPH_PATH
See Also:
Constant Field Values

QUERY_CACHE_PATH

public static final java.lang.String QUERY_CACHE_PATH
See Also:
Constant Field Values

QUERY_MANAGER

public static final java.lang.String QUERY_MANAGER
See Also:
Constant Field Values

CONNECTION_POOL_PATH

public static final java.lang.String CONNECTION_POOL_PATH
See Also:
Constant Field Values

MONOLOG_FACTORY_PATH

public static final java.lang.String MONOLOG_FACTORY_PATH
See Also:
Constant Field Values

PRIMITIVE_MAPPER_PATH

public static final java.lang.String PRIMITIVE_MAPPER_PATH
See Also:
Constant Field Values

JORM_FACTORY_PATH

public static final java.lang.String JORM_FACTORY_PATH
See Also:
Constant Field Values

PMF_PATH

public static final java.lang.String PMF_PATH
See Also:
Constant Field Values

JMX_AGENT_PATH

public static final java.lang.String JMX_AGENT_PATH
See Also:
Constant Field Values

HTML_JMX_AGENT_PATH

public static final java.lang.String HTML_JMX_AGENT_PATH
See Also:
Constant Field Values
Constructor Detail

Speedo

public Speedo()
       throws java.lang.Throwable

Speedo

public Speedo(java.util.Map props)
       throws java.lang.Throwable
It creates and initializes a real SpeedoProxyManagerFactory with Julia (Fractal implementation).

Method Detail

getPersistenceManagerFactory

public static javax.jdo.PersistenceManagerFactory getPersistenceManagerFactory(java.util.Properties props)
                                                                        throws java.lang.Throwable
Throws:
java.lang.Throwable

getPersistenceManagerFactory

public static javax.jdo.PersistenceManagerFactory getPersistenceManagerFactory(java.util.Map m)
                                                                        throws java.lang.Throwable
Throws:
java.lang.Throwable

clearInstances

public static void clearInstances()

getPMFComponent

public ProxyManagerFactory getPMFComponent()
                                    throws java.lang.Exception
Throws:
java.lang.Exception

init

public void init(org.objectweb.fractal.api.Component speedo,
                 java.util.Map pmfProps)
          throws java.lang.Throwable
Throws:
java.lang.Throwable

getMappingStructureString

public static java.lang.String getMappingStructureString(byte b)

getMappingStructure

public static byte getMappingStructure(java.lang.String strval)

getConcurrencyManagerComponent

public java.lang.Object getConcurrencyManagerComponent()
                                                throws java.lang.Exception
Throws:
java.lang.Exception

getDependencyGraph

public org.objectweb.perseus.dependency.api.DependencyGraph getDependencyGraph()
                                                                        throws java.lang.Exception
Throws:
java.lang.Exception

getMemoryCacheEntries

public java.util.Collection getMemoryCacheEntries()
                                           throws java.lang.Exception
Throws:
java.lang.Exception

getPersistenceManager

public javax.jdo.PersistenceManager getPersistenceManager()
Specified by:
getPersistenceManager in interface javax.jdo.PersistenceManagerFactory

getPersistenceManager

public javax.jdo.PersistenceManager getPersistenceManager(java.lang.String s,
                                                          java.lang.String s1)
Specified by:
getPersistenceManager in interface javax.jdo.PersistenceManagerFactory

setConnectionUserName

public void setConnectionUserName(java.lang.String s)
Specified by:
setConnectionUserName in interface javax.jdo.PersistenceManagerFactory

getConnectionUserName

public java.lang.String getConnectionUserName()
Specified by:
getConnectionUserName in interface javax.jdo.PersistenceManagerFactory

setConnectionPassword

public void setConnectionPassword(java.lang.String s)
Specified by:
setConnectionPassword in interface javax.jdo.PersistenceManagerFactory

setConnectionURL

public void setConnectionURL(java.lang.String s)
Specified by:
setConnectionURL in interface javax.jdo.PersistenceManagerFactory

getConnectionURL

public java.lang.String getConnectionURL()
Specified by:
getConnectionURL in interface javax.jdo.PersistenceManagerFactory

setConnectionDriverName

public void setConnectionDriverName(java.lang.String s)
Specified by:
setConnectionDriverName in interface javax.jdo.PersistenceManagerFactory

getConnectionDriverName

public java.lang.String getConnectionDriverName()
Specified by:
getConnectionDriverName in interface javax.jdo.PersistenceManagerFactory

setConnectionFactoryName

public void setConnectionFactoryName(java.lang.String s)
Specified by:
setConnectionFactoryName in interface javax.jdo.PersistenceManagerFactory

getConnectionFactoryName

public java.lang.String getConnectionFactoryName()
Specified by:
getConnectionFactoryName in interface javax.jdo.PersistenceManagerFactory

setConnectionFactory

public void setConnectionFactory(java.lang.Object o)
Specified by:
setConnectionFactory in interface javax.jdo.PersistenceManagerFactory

getConnectionFactory

public java.lang.Object getConnectionFactory()
Specified by:
getConnectionFactory in interface javax.jdo.PersistenceManagerFactory

setConnectionFactory2Name

public void setConnectionFactory2Name(java.lang.String s)
Specified by:
setConnectionFactory2Name in interface javax.jdo.PersistenceManagerFactory

getConnectionFactory2Name

public java.lang.String getConnectionFactory2Name()
Specified by:
getConnectionFactory2Name in interface javax.jdo.PersistenceManagerFactory

setConnectionFactory2

public void setConnectionFactory2(java.lang.Object o)
Specified by:
setConnectionFactory2 in interface javax.jdo.PersistenceManagerFactory

getConnectionFactory2

public java.lang.Object getConnectionFactory2()
Specified by:
getConnectionFactory2 in interface javax.jdo.PersistenceManagerFactory

setMultithreaded

public void setMultithreaded(boolean b)
Specified by:
setMultithreaded in interface javax.jdo.PersistenceManagerFactory

getMultithreaded

public boolean getMultithreaded()
Specified by:
getMultithreaded in interface javax.jdo.PersistenceManagerFactory

setOptimistic

public void setOptimistic(boolean b)
Specified by:
setOptimistic in interface javax.jdo.PersistenceManagerFactory

getOptimistic

public boolean getOptimistic()
Specified by:
getOptimistic in interface javax.jdo.PersistenceManagerFactory

setRetainValues

public void setRetainValues(boolean b)
Specified by:
setRetainValues in interface javax.jdo.PersistenceManagerFactory

getRetainValues

public boolean getRetainValues()
Specified by:
getRetainValues in interface javax.jdo.PersistenceManagerFactory

setRestoreValues

public void setRestoreValues(boolean b)
Specified by:
setRestoreValues in interface javax.jdo.PersistenceManagerFactory

getRestoreValues

public boolean getRestoreValues()
Specified by:
getRestoreValues in interface javax.jdo.PersistenceManagerFactory

setNontransactionalRead

public void setNontransactionalRead(boolean b)
Specified by:
setNontransactionalRead in interface javax.jdo.PersistenceManagerFactory

getNontransactionalRead

public boolean getNontransactionalRead()
Specified by:
getNontransactionalRead in interface javax.jdo.PersistenceManagerFactory

setNontransactionalWrite

public void setNontransactionalWrite(boolean b)
Specified by:
setNontransactionalWrite in interface javax.jdo.PersistenceManagerFactory

getNontransactionalWrite

public boolean getNontransactionalWrite()
Specified by:
getNontransactionalWrite in interface javax.jdo.PersistenceManagerFactory

setIgnoreCache

public void setIgnoreCache(boolean b)
Specified by:
setIgnoreCache in interface javax.jdo.PersistenceManagerFactory

getIgnoreCache

public boolean getIgnoreCache()
Specified by:
getIgnoreCache in interface javax.jdo.PersistenceManagerFactory

getProperties

public java.util.Properties getProperties()
Specified by:
getProperties in interface javax.jdo.PersistenceManagerFactory

supportedOptions

public java.util.Collection supportedOptions()
Specified by:
supportedOptions in interface javax.jdo.PersistenceManagerFactory

getDelegate

public javax.jdo.PersistenceManagerFactory getDelegate()

lookup

public ProxyManager lookup()
Description copied from interface: ProxyManagerFactory
Finds in the associated ProxyManagerSwitch a ProxyManager managed by the ProxyManagerFactory.

Specified by:
lookup in interface ProxyManagerFactory
Returns:
a ProxyManager instance or a null value.

getSequenceManager

public SequenceManager getSequenceManager()
Description copied from interface: ProxyManagerFactory
Get the sequence manager associated to the pmf.

Specified by:
getSequenceManager in interface ProxyManagerFactory

setSequenceManager

public void setSequenceManager(SequenceManager sequenceManager)
Description copied from interface: ProxyManagerFactory
Set the sequence manager.

Specified by:
setSequenceManager in interface ProxyManagerFactory

unbindPM

public void unbindPM()
Description copied from interface: ProxyManagerFactory
It call pms.unbind(this) in order to unbind a ProxyManager managed by this ProxyManagerFactory, from the thread.

Specified by:
unbindPM in interface ProxyManagerFactory

bindPM2Thread

public void bindPM2Thread(ProxyManager pm)
Description copied from interface: ProxyManagerFactory
Ask to the PMS to bind a particular PM to the Thread.

Specified by:
bindPM2Thread in interface ProxyManagerFactory
Parameters:
pm -

proxyManagerClosed

public void proxyManagerClosed(ProxyManager pr)
Description copied from interface: ProxyManagerFactory
Indicates when a PM has been closed.

Specified by:
proxyManagerClosed in interface ProxyManagerFactory
Parameters:
pr - the closed PM.

close

public void close()
Specified by:
close in interface javax.jdo.PersistenceManagerFactory

getDataStoreCache

public javax.jdo.datastore.DataStoreCache getDataStoreCache()
Specified by:
getDataStoreCache in interface javax.jdo.PersistenceManagerFactory

getMapping

public java.lang.String getMapping()
Specified by:
getMapping in interface javax.jdo.PersistenceManagerFactory

isClosed

public boolean isClosed()
Specified by:
isClosed in interface javax.jdo.PersistenceManagerFactory

setMapping

public void setMapping(java.lang.String arg0)
Specified by:
setMapping in interface javax.jdo.PersistenceManagerFactory

evict

public void evict(java.lang.Object arg0)
Specified by:
evict in interface javax.jdo.datastore.DataStoreCache

evictAll

public void evictAll()
Specified by:
evictAll in interface javax.jdo.datastore.DataStoreCache

evictAll

public void evictAll(java.lang.Class arg0,
                     boolean arg1)
Specified by:
evictAll in interface javax.jdo.datastore.DataStoreCache

evictAll

public void evictAll(java.util.Collection arg0)
Specified by:
evictAll in interface javax.jdo.datastore.DataStoreCache

evictAll

public void evictAll(java.lang.Object[] arg0)
Specified by:
evictAll in interface javax.jdo.datastore.DataStoreCache

pin

public void pin(java.lang.Object arg0)
Specified by:
pin in interface javax.jdo.datastore.DataStoreCache

pinAll

public void pinAll(java.lang.Class arg0,
                   boolean arg1)
Specified by:
pinAll in interface javax.jdo.datastore.DataStoreCache

pinAll

public void pinAll(java.util.Collection arg0)
Specified by:
pinAll in interface javax.jdo.datastore.DataStoreCache

pinAll

public void pinAll(java.lang.Object[] arg0)
Specified by:
pinAll in interface javax.jdo.datastore.DataStoreCache

unpin

public void unpin(java.lang.Object arg0)
Specified by:
unpin in interface javax.jdo.datastore.DataStoreCache

unpinAll

public void unpinAll(java.lang.Class arg0,
                     boolean arg1)
Specified by:
unpinAll in interface javax.jdo.datastore.DataStoreCache

unpinAll

public void unpinAll(java.util.Collection arg0)
Specified by:
unpinAll in interface javax.jdo.datastore.DataStoreCache

unpinAll

public void unpinAll(java.lang.Object[] arg0)
Specified by:
unpinAll in interface javax.jdo.datastore.DataStoreCache

addInstanceLifecycleListener

public void addInstanceLifecycleListener(javax.jdo.listener.InstanceLifecycleListener arg0,
                                         java.lang.Class[] arg1)
Specified by:
addInstanceLifecycleListener in interface javax.jdo.PersistenceManagerFactory

removeInstanceLifecycleListener

public void removeInstanceLifecycleListener(javax.jdo.listener.InstanceLifecycleListener arg0)
Specified by:
removeInstanceLifecycleListener in interface javax.jdo.PersistenceManagerFactory