Project Wonder 5.0

er.extensions.concurrency
Class ERXAbstractTask

java.lang.Object
  extended by er.extensions.concurrency.ERXAbstractTask

public class ERXAbstractTask
extends java.lang.Object

A convenience class that provides some common logic that is used in Runnable and/or Callable tasks.

Author:
kieran

Constructor Summary
ERXAbstractTask()
           
 
Method Summary
protected  com.webobjects.eocontrol.EOEditingContext newEditingContext()
          You must manually lock and unlock the editing context returned by this method. It is not recommended that you depend on auto locking in background threads.
protected  com.webobjects.eocontrol.EOObjectStore parentObjectStore()
          See EFfective Java item #71 for explanation of this threadsafe lazy initialization technique
 void setParentObjectStore(com.webobjects.eocontrol.EOObjectStore parentObjectStore)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ERXAbstractTask

public ERXAbstractTask()
Method Detail

parentObjectStore

protected final com.webobjects.eocontrol.EOObjectStore parentObjectStore()
See EFfective Java item #71 for explanation of this threadsafe lazy initialization technique

Returns:
the parent, usually an EOObjectStoreCoordinator to partition the task's EOF intensive work form the rest of the app.

setParentObjectStore

public final void setParentObjectStore(com.webobjects.eocontrol.EOObjectStore parentObjectStore)
Parameters:
parentObjectStore - the parent, usually an EOObjectStoreCoordinator to partition the task's EOF intensive work from the rest of the app. If you are going to manually set this, you should do it before starting the task.

newEditingContext

protected com.webobjects.eocontrol.EOEditingContext newEditingContext()
You must manually lock and unlock the editing context returned by this method. It is not recommended that you depend on auto locking in background threads. Even though this method currently returns an auto-locking EC if auto-locking is turned on for the app, a future update is planned that will return a manually locking EC from this method even if auto-locking is turned on for regular ECs used in normal request-response execution.

Returns:
a new EOEditingContext.

Last updated: Tue, Feb 21, 2017 • 05:45 PM CET

Copyright © 2002 – 2007 Project Wonder.