Constructor and Description |
---|
LockedWrapper() |
Modifier and Type | Method and Description |
---|---|
T |
with(Node lockable,
boolean isDeep)
Executes
Locked.run(Node) while the lock on lockable is held. |
T |
with(Node lockable,
boolean isDeep,
boolean isSessionScoped)
Executes
Locked.run(Node) while the lock on lockable is held. |
T |
with(Node lockable,
boolean isDeep,
long timeout)
Executes the method
Locked.run(Node) within the scope of a lock held on
lockable . |
java.lang.Object |
with(Node lockable,
boolean isDeep,
long timeout,
boolean isSessionScoped)
Executes the method
Locked.run(Node) within the scope of a lock held on
lockable . |
public T with(Node lockable, boolean isDeep) throws RepositoryException, java.lang.InterruptedException
Locked
Locked.run(Node)
while the lock on lockable
is held.
This method will block until Locked.run(Node)
is executed while holding the
lock on node lockable
.with
in class Locked
lockable
- a lockable node.isDeep
- true
if lockable
will be locked
deep.Locked.run(Node)
.RepositoryException
- if Locked.run(Node)
throws an exception.java.lang.InterruptedException
- if this thread is interrupted while waiting
for the lock on node lockable
.public T with(Node lockable, boolean isDeep, boolean isSessionScoped) throws RepositoryException, java.lang.InterruptedException
Locked
Locked.run(Node)
while the lock on lockable
is held.
This method will block until Locked.run(Node)
is executed while holding the
lock on node lockable
.with
in class Locked
lockable
- a lockable node.isDeep
- true
if lockable
will be locked
deep.isSessionScoped
- true
if the lock is session scoped.Locked.run(Node)
.RepositoryException
- if Locked.run(Node)
throws an exception.java.lang.InterruptedException
- if this thread is interrupted while waiting
for the lock on node lockable
.public T with(Node lockable, boolean isDeep, long timeout) throws UnsupportedRepositoryOperationException, RepositoryException, java.lang.InterruptedException
Locked
Locked.run(Node)
within the scope of a lock held on
lockable
.with
in class Locked
lockable
- the node where the lock is obtained from.isDeep
- true
if lockable
will be locked
deep.timeout
- time in milliseconds to wait at most to acquire the lock.Locked.run(Node)
or Locked.TIMED_OUT
if the
lock on lockable
could not be acquired within the
specified timeout.UnsupportedRepositoryOperationException
- if this repository does not support
locking.RepositoryException
- if Locked.run(Node)
throws an exception.java.lang.InterruptedException
- if this thread is interrupted while
waiting for the lock on node
lockable
.public java.lang.Object with(Node lockable, boolean isDeep, long timeout, boolean isSessionScoped) throws UnsupportedRepositoryOperationException, RepositoryException, java.lang.InterruptedException
Locked
Locked.run(Node)
within the scope of a lock held on
lockable
.with
in class Locked
lockable
- the node where the lock is obtained from.isDeep
- true
if lockable
will be locked
deep.timeout
- time in milliseconds to wait at most to acquire the lock.isSessionScoped
- true
if the lock is session scoped.Locked.run(Node)
or Locked.TIMED_OUT
if the
lock on lockable
could not be acquired within the
specified timeout.UnsupportedRepositoryOperationException
- if this repository does not support
locking.RepositoryException
- if Locked.run(Node)
throws an exception.java.lang.InterruptedException
- if this thread is interrupted while
waiting for the lock on node
lockable
."Copyright © 2010 - 2020 Adobe Systems Incorporated. All Rights Reserved"