Nuxeo ECM Projects 5.4.3-SNAPSHOT

org.nuxeo.ecm.platform.scheduler.core.service
Class SchedulerRegistryService

java.lang.Object
  extended by org.nuxeo.runtime.model.DefaultComponent
      extended by org.nuxeo.ecm.platform.scheduler.core.service.SchedulerRegistryService
All Implemented Interfaces:
SchedulerRegistry, Adaptable, Component, Extensible

public class SchedulerRegistryService
extends DefaultComponent
implements SchedulerRegistry

Schedule registry service. Since the cleanup of the quartz job is done when service is activated, ( see see https://jira.nuxeo.com/browse/NXP-7303 ) in cluster mode, the schedules contributions MUST be the same on all nodes. Due the fact that all jobs are removed when service starts on a node it may be a short period with no schedules in quartz table even other node is running.


Field Summary
static ComponentName NAME
           
 
Constructor Summary
SchedulerRegistryService()
           
 
Method Summary
 void activate(ComponentContext context)
          Activates the component.
 void deactivate(ComponentContext context)
          Deactivates the component.
 RuntimeContext getContext()
           
 void registerExtension(Extension extension)
          Registers the given extension.
 void registerSchedule(Schedule schedule)
          Registers a schedule.
 void registerSchedule(Schedule schedule, Map<String,Serializable> parameters)
          Registers a schedule.
 void unregisterExtension(Extension extension)
          Unregisters the given extension.
 boolean unregisterSchedule(Schedule schedule)
          UnRegisters a schedule.
 boolean unregisterSchedule(String scheduleId)
          UnRegisters a schedule.
 
Methods inherited from class org.nuxeo.runtime.model.DefaultComponent
applicationStarted, getAdapter, registerContribution, unregisterContribution
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NAME

public static final ComponentName NAME
Constructor Detail

SchedulerRegistryService

public SchedulerRegistryService()
Method Detail

activate

public void activate(ComponentContext context)
              throws Exception
Description copied from interface: Component
Activates the component.

This method is called by the runtime when a component is activated.

Specified by:
activate in interface Component
Overrides:
activate in class DefaultComponent
Parameters:
context - the runtime context
Throws:
Exception - if an error occurs during activation

deactivate

public void deactivate(ComponentContext context)
                throws Exception
Description copied from interface: Component
Deactivates the component.

This method is called by the runtime when a component is deactivated.

Specified by:
deactivate in interface Component
Overrides:
deactivate in class DefaultComponent
Parameters:
context - the runtime context
Throws:
Exception - if an error occurs during activation

registerExtension

public void registerExtension(Extension extension)
Description copied from interface: Extensible
Registers the given extension.

Specified by:
registerExtension in interface Extensible
Overrides:
registerExtension in class DefaultComponent
Parameters:
extension - the extension to register

unregisterExtension

public void unregisterExtension(Extension extension)
Description copied from interface: Extensible
Unregisters the given extension.

Specified by:
unregisterExtension in interface Extensible
Overrides:
unregisterExtension in class DefaultComponent
Parameters:
extension - the extension to unregister

getContext

public RuntimeContext getContext()

registerSchedule

public void registerSchedule(Schedule schedule)
Description copied from interface: SchedulerRegistry
Registers a schedule.

Specified by:
registerSchedule in interface SchedulerRegistry
Parameters:
schedule - the schedule

registerSchedule

public void registerSchedule(Schedule schedule,
                             Map<String,Serializable> parameters)
Description copied from interface: SchedulerRegistry
Registers a schedule. Add all parameters to eventContext.

Specified by:
registerSchedule in interface SchedulerRegistry

unregisterSchedule

public boolean unregisterSchedule(String scheduleId)
Description copied from interface: SchedulerRegistry
UnRegisters a schedule.

Specified by:
unregisterSchedule in interface SchedulerRegistry
Parameters:
scheduleId - the schedule id
Returns:
true if schedule has been successfully removed.

unregisterSchedule

public boolean unregisterSchedule(Schedule schedule)
Description copied from interface: SchedulerRegistry
UnRegisters a schedule.

Specified by:
unregisterSchedule in interface SchedulerRegistry
Parameters:
schedule - to be unregistered
Returns:
true if schedule has been successfully removed.

Nuxeo ECM Projects 5.4.3-SNAPSHOT

Copyright © 2011 Nuxeo SAS. All Rights Reserved.