org.objectweb.speedo.api
Interface ProxyManagerSwitch
- All Known Implementing Classes:
- SpeedoProxyManagerSwitch
- public interface ProxyManagerSwitch
This interfaces defines a ProxyManager switch. It bindes a thread to a
list of ProxyManager. In a same context two proxy managers cannot be managed
by the same PersistentManagerFactory.
- Author:
- S.Chassande-Barrioz
Method Summary |
void |
bind(ProxyManager pm)
It assignes a ProxyManager to the current context. |
void |
clear()
It clears the list of ProxyManager for the current context. |
java.util.Collection |
entries()
|
ProxyManager |
lookup(javax.jdo.PersistenceManagerFactory pmf)
|
boolean |
remove(ProxyManager pm)
It clears a ProxyManager for the current context. |
lookup
public ProxyManager lookup(javax.jdo.PersistenceManagerFactory pmf)
- Parameters:
pmf
- is persistent manager factory which manages the returned
proxy manager.- Returns:
- the ProxyManager managed by the given persistence manager factory
and bound to current the context, or the null value if there is no
ProxyManager.
bind
public void bind(ProxyManager pm)
throws SpeedoException
- It assignes a ProxyManager to the current context.
- Parameters:
pm
- is the ProxyManager- Throws:
SpeedoException
- is thrown when a proxy manager which has the
same PersistentManagerFactory is already bound to the current context.
clear
public void clear()
- It clears the list of ProxyManager for the current context.
remove
public boolean remove(ProxyManager pm)
- It clears a ProxyManager for the current context.
entries
public java.util.Collection entries()
- Returns:
- all ProxyManager instances bound with the current context