|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.sling.event.impl.jobs.jcr.PersistenceHandler
@Services(value={@Service(value=PersistenceHandler.class),@Service(value=org.osgi.service.event.EventHandler.class),@Service(value=java.lang.Runnable.class)}) @Properties(value={@Property(name="event.topics",propertyPrivate=true,value={"org/osgi/framework/BundleEvent/UPDATED","org/osgi/framework/BundleEvent/STARTED","org/apache/sling/event/job"}),@Property(name="scheduler.period",longValue=300L,label="%persscheduler.period.name",description="%persscheduler.period.description"),@Property(name="scheduler.concurrent",boolValue=false,propertyPrivate=true)}) public class PersistenceHandler
Persistence handler for the jobs
Constructor Summary | |
---|---|
PersistenceHandler()
|
Method Summary | |
---|---|
protected void |
activate(org.osgi.service.component.ComponentContext context)
Activate this component. |
void |
cleanup()
This method is invoked periodically. |
protected void |
deactivate(org.osgi.service.component.ComponentContext context)
Deactivate this component. |
void |
finished(JobEvent info)
Finish the job |
org.osgi.service.event.Event |
forceReadEvent(javax.jcr.Node eventNode)
Read an event from the repository. |
String |
getRepositoryPath()
Return the repository path. |
void |
handleEvent(org.osgi.service.event.Event event)
|
boolean |
lock(JobEvent info)
Try to lock the node in the repository. |
void |
onEvent(javax.jcr.observation.EventIterator iter)
|
boolean |
remove(String jobId)
Remove the job - if not currently in processing. |
boolean |
reschedule(JobEvent info)
Reschedule the job |
void |
restart(JobEvent info)
Try to restart the job |
void |
run()
This method is invoked periodically by the scheduler. |
void |
unlock(JobEvent info)
Unlock the node for the event |
protected void |
update(org.osgi.service.component.ComponentContext context)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PersistenceHandler()
Method Detail |
---|
@Activate protected void activate(org.osgi.service.component.ComponentContext context) throws javax.jcr.RepositoryException
context
- The component context.
javax.jcr.RepositoryException
@Deactivate protected void deactivate(org.osgi.service.component.ComponentContext context)
context
- The component context.@Modified protected void update(org.osgi.service.component.ComponentContext context)
public void onEvent(javax.jcr.observation.EventIterator iter)
onEvent
in interface javax.jcr.observation.EventListener
EventListener.onEvent(javax.jcr.observation.EventIterator)
public void cleanup()
Runnable.run()
public String getRepositoryPath()
public org.osgi.service.event.Event forceReadEvent(javax.jcr.Node eventNode) throws javax.jcr.RepositoryException
readEvent(Node, boolean)
with the exception
that it even loads the event if classes are missing
javax.jcr.RepositoryException
public boolean lock(JobEvent info)
info
- The job event
true
if the node could be lockedpublic void restart(JobEvent info)
public void unlock(JobEvent info)
public void finished(JobEvent info)
public boolean remove(String jobId)
public boolean reschedule(JobEvent info)
public void run()
run
in interface Runnable
Runnable.run()
public void handleEvent(org.osgi.service.event.Event event)
handleEvent
in interface org.osgi.service.event.EventHandler
EventHandler.handleEvent(org.osgi.service.event.Event)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |