com.atlassian.bitbucket.concurrent.PullRequestLock |
A reusable component for locking a pull request
while an operation
is
performed.
Separate instances of this interface are not related. Locking a pull request
in one
instance does not lock it in any other. The intention is to allow grouping operations
that
perform similar processing, or rely on the same pull request data, so that only one is running on a given pull
request at a time, using multiple locks when different bands of processing can be performed concurrently.
Note: When used by plugin developers, no instance of this lock can ever prevent the host application from performing any of its own processing on any aspect of a pull request.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Performs the provided
operation while holding a lock on the specified pull request . | |||||||||||
Performs the provided
operation while holding a lock on the specified pull request . |
Performs the provided operation
while holding a lock on the specified pull request
.
Note: Locking a pull request by ID or by PullRequest
instance acquires the same underlying lock.
repositoryId | the ID of the repository to lock |
---|---|
pullRequestId | the ID of the pull request to lock in the specified repository |
operation | the operation to perform while holding the lock |
performing
the operationif the operation fails
|
|
Exception |
Performs the provided operation
while holding a lock on the specified pull request
.
Note: Locking a pull request by ID or by PullRequest
instance acquires the same underlying lock.
pullRequest | the pull request to lock |
---|---|
operation | the operation to perform while holding the lock |
performing
the operationif the operation fails
|
|
Exception |