public class ERXObjectStoreCoordinatorPool extends Object
er.extensions.ERXObjectStoreCoordinatorPool.maxCoordinators
.
Each Session will become one EOObjectStoreCoordinator and the method
newEditingContext
will always return an EOEditingContext
with the same EOObjectStoreCoordinator
for the same WOSession
.
This first release uses round-robin pooling, future versions might use better algorithms
to decide which EOObjectStoreCoordinator
will be used for the next new
WOSession
.Modifier and Type | Class and Description |
---|---|
static class |
ERXObjectStoreCoordinatorPool.MultiOSCFactory
This class uses different EOF stack when creating new EOEditingContexts.
|
Constructor and Description |
---|
ERXObjectStoreCoordinatorPool(int maxObjectStoreCoordinators)
Creates a new ERXObjectStoreCoordinatorPool.
|
Modifier and Type | Method and Description |
---|---|
static ERXObjectStoreCoordinatorPool |
_pool() |
EOObjectStore |
currentRootObjectStore()
returns the session related EOObjectStoreCoordinator.
|
protected EOObjectStore |
currentThreadObjectStore()
Returns the object store for the current thread (or requests one and sets it if there isn't one).
|
static void |
initialize()
Creates the singleton and registers the multi factory.
|
static void |
initializeIfNecessary()
Calls initialize() if the required system properties exist.
|
EOObjectStore |
nextObjectStore()
Lazy initialises the objectStores and then returns the next one,
this is based on round robin.
|
void |
sessionDidCreate(NSNotification n)
checks if the new Session has already a EOObjectStoreCoordinator assigned,
if not it assigns a EOObjectStoreCoordinator to the session.
|
void |
sessionDidTimeout(NSNotification n)
Removes the timed out session from the internal array.
|
protected String |
sessionID() |
EOSharedEditingContext |
sharedEditingContextForObjectStore(EOObjectStore os) |
public ERXObjectStoreCoordinatorPool(int maxObjectStoreCoordinators)
public static ERXObjectStoreCoordinatorPool _pool()
public static void initializeIfNecessary()
public static void initialize()
public void sessionDidCreate(NSNotification n)
n
- WOSession.SessionDidCreateNotification
public void sessionDidTimeout(NSNotification n)
n
- WOSession.SessionDidTimeOutNotification
protected String sessionID()
public EOObjectStore currentRootObjectStore()
protected EOObjectStore currentThreadObjectStore()
public EOObjectStore nextObjectStore()
public EOSharedEditingContext sharedEditingContextForObjectStore(EOObjectStore os)
Copyright © 2002 – 2024 Project Wonder.