Interface LockManager

All Superinterfaces:
AutoCloseable
All Known Implementing Classes:
DynamoDbLockManager, LockManagers.BaseLockManager

public interface LockManager extends AutoCloseable
An interface for locking, used to ensure commit isolation.
  • Method Details

    • acquire

      boolean acquire(String entityId, String ownerId)
      Try to acquire a lock
      Parameters:
      entityId - ID of the entity to lock
      ownerId - ID of the owner if the lock
      Returns:
      if the lock for the entity is acquired by the owner
    • release

      boolean release(String entityId, String ownerId)
      Release a lock

      exception must not be thrown for this method.

      Parameters:
      entityId - ID of the entity to lock
      ownerId - ID of the owner if the lock
      Returns:
      if the owner held the lock and successfully released it.
    • initialize

      void initialize(Map<String,String> properties)
      Initialize lock manager from catalog properties.
      Parameters:
      properties - catalog properties