Interface LockFactory

All Known Implementing Classes:
NullLockFactory, PessimisticLockFactory
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface LockFactory
Interface to the lock factory. A lock factory produces locks on resources that are shared between threads.
Since:
0.3
Author:
Allard Buijze
  • Method Summary

    Modifier and Type
    Method
    Description
    obtainLock(String identifier)
    Obtain a lock for a resource identified by given identifier.
  • Method Details

    • obtainLock

      Lock obtainLock(String identifier)
      Obtain a lock for a resource identified by given identifier. Depending on the strategy, this method may return immediately or block until a lock is held.
      Parameters:
      identifier - the identifier of the resource to obtain a lock for.
      Returns:
      a handle to release the lock.