Package org.eclipse.emf.cdo.common.model
Class CDOPackageRegistryPopulator
- java.lang.Object
-
- org.eclipse.net4j.util.event.Notifier
-
- org.eclipse.net4j.util.lifecycle.Lifecycle
-
- org.eclipse.net4j.util.concurrent.Worker
-
- org.eclipse.emf.cdo.common.model.CDOPackageRegistryPopulator
-
- All Implemented Interfaces:
org.eclipse.net4j.util.event.INotifier,org.eclipse.net4j.util.event.INotifier.INotifier2,org.eclipse.net4j.util.lifecycle.IDeactivateable,org.eclipse.net4j.util.lifecycle.ILifecycle,org.eclipse.net4j.util.lifecycle.ILifecycle.DeferrableActivation
public class CDOPackageRegistryPopulator extends org.eclipse.net4j.util.concurrent.WorkerPopulates atargetpackage registry by asynchronously polling asourcepackage registry for newEPackageregistrations.- Since:
- 2.0
- Author:
- Eike Stepper
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCDOPackageRegistryPopulator.Descriptor-
Nested classes/interfaces inherited from class org.eclipse.net4j.util.concurrent.Worker
org.eclipse.net4j.util.concurrent.Worker.WorkContext
-
-
Field Summary
Fields Modifier and Type Field Description static intDEFAULT_SOURCE_POLL_INTERVAL
-
Constructor Summary
Constructors Constructor Description CDOPackageRegistryPopulator(CDOPackageRegistry target)CDOPackageRegistryPopulator(org.eclipse.emf.ecore.EPackage.Registry source, CDOPackageRegistry target)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddoActivate()protected voiddoWork()org.eclipse.emf.ecore.EPackage.RegistrygetSource()longgetSourcePollInterval()CDOPackageRegistrygetTarget()protected java.lang.StringgetThreadName()static booleanpopulate(CDOPackageRegistry target)static booleanpopulate(org.eclipse.emf.ecore.EPackage.Registry source, CDOPackageRegistry target)voidsetSourcePollInterval(long sourcePollInterval)protected voidwork(org.eclipse.net4j.util.concurrent.Worker.WorkContext context)-
Methods inherited from class org.eclipse.net4j.util.concurrent.Worker
doDeactivate, getActivationTimeout, getDeactivationTimeout, getGlobalErrorHandler, getWorkerThread, handleError, isDaemon, setActivationTimeout, setDaemon, setDeactivationTimeout, setGlobalErrorHandler
-
Methods inherited from class org.eclipse.net4j.util.lifecycle.Lifecycle
activate, checkActive, checkArg, checkArg, checkInactive, checkNull, checkState, checkState, deactivate, deferredActivate, doAfterActivate, doBeforeActivate, doBeforeDeactivate, dump, getLifecycleState, isActive, isDeferredActivation, toString
-
Methods inherited from class org.eclipse.net4j.util.event.Notifier
addListener, addUniqueListener, fireEvent, fireEvent, fireEvent, fireThrowable, firstListenerAdded, getListeners, getNotificationService, hasListener, hasListeners, lastListenerRemoved, listenerAdded, listenerRemoved, removeListener
-
-
-
-
Field Detail
-
DEFAULT_SOURCE_POLL_INTERVAL
public static final int DEFAULT_SOURCE_POLL_INTERVAL
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
CDOPackageRegistryPopulator
public CDOPackageRegistryPopulator(CDOPackageRegistry target)
-
CDOPackageRegistryPopulator
public CDOPackageRegistryPopulator(org.eclipse.emf.ecore.EPackage.Registry source, CDOPackageRegistry target)
-
-
Method Detail
-
getSource
public org.eclipse.emf.ecore.EPackage.Registry getSource()
-
getTarget
public CDOPackageRegistry getTarget()
-
getSourcePollInterval
public long getSourcePollInterval()
-
setSourcePollInterval
public void setSourcePollInterval(long sourcePollInterval)
-
work
protected void work(org.eclipse.net4j.util.concurrent.Worker.WorkContext context) throws java.lang.Exception- Specified by:
workin classorg.eclipse.net4j.util.concurrent.Worker- Throws:
java.lang.Exception
-
doWork
protected void doWork()
-
doActivate
protected void doActivate() throws java.lang.Exception- Overrides:
doActivatein classorg.eclipse.net4j.util.concurrent.Worker- Throws:
java.lang.Exception
-
getThreadName
protected java.lang.String getThreadName()
- Overrides:
getThreadNamein classorg.eclipse.net4j.util.concurrent.Worker
-
populate
public static boolean populate(CDOPackageRegistry target)
-
populate
public static boolean populate(org.eclipse.emf.ecore.EPackage.Registry source, CDOPackageRegistry target)
-
-