|
||||||||||
| 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
@Service(value={PersistenceHandler.class,org.osgi.service.event.EventHandler.class,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 PersistenceHandlerPersistence 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. |
java.lang.String |
getRepositoryPath()
Return the repository path. |
void |
handleEvent(org.osgi.service.event.Event event)
|
boolean |
isAlive(JCRJobEvent info)
Check if the job is still alive = unfinished node in repository |
boolean |
lock(JobEvent info)
Try to lock the node in the repository. |
void |
onEvent(javax.jcr.observation.EventIterator iter)
|
boolean |
remove(java.lang.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.EventListenerEventListener.onEvent(javax.jcr.observation.EventIterator)public void cleanup()
Runnable.run()public java.lang.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.RepositoryExceptionpublic 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(java.lang.String jobId)
public boolean reschedule(JobEvent info)
public void run()
run in interface java.lang.RunnableRunnable.run()public void handleEvent(org.osgi.service.event.Event event)
handleEvent in interface org.osgi.service.event.EventHandlerEventHandler.handleEvent(org.osgi.service.event.Event)public boolean isAlive(JCRJobEvent info)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||