|
||||||||||
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
@Services(value={@Service(value=java.lang.Runnable.class),@Service(value=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(Map<String,Object> props)
Activate this component. |
protected void |
deactivate()
Deactivate this component. |
void |
lock(javax.jcr.Session session,
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,
String path)
Unlock the node at the given path. |
protected void |
update(Map<String,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(Map<String,Object> props) throws javax.jcr.RepositoryException
props
- The configuration properties.
javax.jcr.RepositoryException
@Deactivate protected void deactivate()
@Modified protected void update(Map<String,Object> props)
public void run()
run
in interface Runnable
Runnable.run()
public void onEvent(javax.jcr.observation.EventIterator events)
onEvent
in interface javax.jcr.observation.EventListener
EventListener.onEvent(javax.jcr.observation.EventIterator)
public void lock(javax.jcr.Session session, 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 wrongpublic void unlock(javax.jcr.Session session, 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 |