|
||||||||||
| 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.LockManager
@Service(value={java.lang.Runnable.class,LockManager.class})
@Properties(value={@Property(name="scheduler.period",longValue=60L,propertyPrivate=true),@Property(name="scheduler.concurrent",boolValue=false,propertyPrivate=true)})
public class LockManager
| Constructor Summary | |
|---|---|
LockManager()
|
|
| Method Summary | |
|---|---|
protected void |
activate(java.util.Map<java.lang.String,java.lang.Object> props)
Activate this component. |
protected void |
deactivate()
Deactivate this component. |
void |
lock(javax.jcr.Session session,
java.lang.String path)
Lock the node at the given path |
void |
onEvent(javax.jcr.observation.EventIterator events)
|
void |
run()
Cron job |
void |
unlock(javax.jcr.Session session,
java.lang.String path)
Unlock the node at the given path. |
protected void |
update(java.util.Map<java.lang.String,java.lang.Object> props)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LockManager()
| Method Detail |
|---|
@Activate
protected void activate(java.util.Map<java.lang.String,java.lang.Object> props)
throws javax.jcr.RepositoryException
props - The configuration properties.
javax.jcr.RepositoryException@Deactivate protected void deactivate()
@Modified protected void update(java.util.Map<java.lang.String,java.lang.Object> props)
public void run()
run in interface java.lang.RunnableRunnable.run()public void onEvent(javax.jcr.observation.EventIterator events)
onEvent in interface javax.jcr.observation.EventListenerEventListener.onEvent(javax.jcr.observation.EventIterator)
public void lock(javax.jcr.Session session,
java.lang.String path)
throws javax.jcr.RepositoryException
session - The session to create the lock withpath - The path to the node to lock
javax.jcr.RepositoryException - If anything goes wrong
public void unlock(javax.jcr.Session session,
java.lang.String path)
throws javax.jcr.RepositoryException
session - The session for unlockingpath - The path to the node to unlock
javax.jcr.RepositoryException - If anything goes wrong
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||