org.objectweb.speedo.mim.lib
Class SpeedoMemoryInstanceManager
java.lang.Object
org.objectweb.speedo.mim.lib.SpeedoMemoryInstanceManager
- All Implemented Interfaces:
- MemoryInstanceManagerAttribute
- public class SpeedoMemoryInstanceManager
- extends java.lang.Object
- implements MemoryInstanceManagerAttribute
This class is an implementation of the MemoryInstanceManager provided by the
persistence framwork availlable in perseus. This implementation depends on
the identifier used, and the way to instanciate user objects. This
implementation supports only the jorm object identifier: PName.
This implementation supports also the instanciation of the Jorm generic
class. To do this it is needed to specify for each jorm generic class used
the name of the class which must be instanciated. This configuration is done
via the GenClassNames attribute.
This implementation does not used a pool, then the instance are created at
each newInstance call.
- Author:
- S.Chassande-Barrioz
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JORM_FACTORY_BINDING
public static final java.lang.String JORM_FACTORY_BINDING
- See Also:
- Constant Field Values
PMS_BINDING
public static final java.lang.String PMS_BINDING
- See Also:
- Constant Field Values
jf
protected JormFactory jf
pmf
protected ProxyManagerFactory pmf
logger
protected Logger logger
SpeedoMemoryInstanceManager
public SpeedoMemoryInstanceManager()
listFc
public java.lang.String[] listFc()
lookupFc
public java.lang.Object lookupFc(java.lang.String s)
bindFc
public void bindFc(java.lang.String s,
java.lang.Object o)
unbindFc
public void unbindFc(java.lang.String s)
getGenClassNames
public java.lang.String getGenClassNames()
- Specified by:
getGenClassNames
in interface MemoryInstanceManagerAttribute
- Returns:
- a String describing the genclass names with the following format:
"(jorm_name,java_name),(jorm_name,java_name),(jorm_name,java_name)}"
setGenClassNames
public void setGenClassNames(java.lang.String gcname)
- It assignes a description of the gen class names.
- Specified by:
setGenClassNames
in interface MemoryInstanceManagerAttribute
- Parameters:
gcname
- is the desciption which must follow this format:
"(jorm_name,java_name),(jorm_name,java_name),(jorm_name,java_name)}"
newInstance
public java.lang.Object newInstance(java.lang.Object oid,
ConnectionHolder context)
throws PersistenceException
- It creates an instance since an identifier
- Parameters:
oid
- is the identifier of the futur object
- Returns:
- a memory instance
- Throws:
PersistenceException
createState
public State createState(CacheEntry ce)
getReferenceState
public State getReferenceState(CacheEntry ce)
destroyState
public void destroyState(State state)
makeUnexported
public void makeUnexported(State state)
isUnexported
public boolean isUnexported(State state)
makeExported
public void makeExported(State state)
isExported
public boolean isExported(State state)
makeDirty
public void makeDirty(State state)
isDirty
public boolean isDirty(State state)
setReferenceState
public void setReferenceState(CacheEntry ce,
State state)
makeClean
public void makeClean(State state)
makeFlushed
public void makeFlushed(State state)
isFlushed
public boolean isFlushed(State state)
makeUnbound
public void makeUnbound(CacheEntry ce)
makeBound
public void makeBound(CacheEntry ce,
java.lang.Object oid)
isBound
public boolean isBound(CacheEntry ce)
isToMerge
public boolean isToMerge(State state)
makeToMerge
public void makeToMerge(State state,
java.lang.Object thinLock)
merge
public State merge(State oldState,
State newState)
stateNoMoreUsed
public void stateNoMoreUsed(State state)
entryBound
public void entryBound(CacheEvent event)
- Parameters:
event
-
entryUnbound
public void entryUnbound(CacheEvent event)
- Parameters:
event
-
create
public FixableCacheEntry create(java.lang.Object id,
java.lang.Object obj)
- binds the SpeedoProxy to its identifier (PName) if it does not have
already one.
- Parameters:
id
- is the PName of the SpeedoProxyobj
- is the SpeedoProxy instance added into the cache
- Returns:
- the SpeedoProxy instance