public interface

LockService

com.atlassian.bitbucket.concurrent.LockService

Class Overview

Provides various types of locks, all of which are safe to use in a cluster.

Summary

Public Methods
@Nonnull Lock getLock(String lockName)
Creates or retrieves a Lock by name
@Nonnull PullRequestLock getPullRequestLock(String lockName)
Creates or retrieves a PullRequestLock by name
@Nonnull RepositoryLock getRepositoryLock(String lockName)
Creates or retrieves a RepositoryLock by name

Public Methods

@Nonnull public Lock getLock (String lockName)

Creates or retrieves a Lock by name

Parameters
lockName the name of the lock
Returns
  • the lock

@Nonnull public PullRequestLock getPullRequestLock (String lockName)

Creates or retrieves a PullRequestLock by name

Parameters
lockName the name of the lock
Returns
  • the pull request lock

@Nonnull public RepositoryLock getRepositoryLock (String lockName)

Creates or retrieves a RepositoryLock by name

Parameters
lockName the name of the lock
Returns
  • the repository lock