Package org.apache.iceberg
Interface LockManager
-
- All Superinterfaces:
java.lang.AutoCloseable
- All Known Implementing Classes:
DynamoDbLockManager,LockManagers.BaseLockManager
public interface LockManager extends java.lang.AutoCloseableAn interface for locking, used to ensure commit isolation.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanacquire(java.lang.String entityId, java.lang.String ownerId)Try to acquire a lockvoidinitialize(java.util.Map<java.lang.String,java.lang.String> properties)Initialize lock manager from catalog properties.booleanrelease(java.lang.String entityId, java.lang.String ownerId)Release a lock exception must not be thrown for this method.
-
-
-
Method Detail
-
acquire
boolean acquire(java.lang.String entityId, java.lang.String ownerId)Try to acquire a lock- Parameters:
entityId- ID of the entity to lockownerId- ID of the owner if the lock- Returns:
- if the lock for the entity is acquired by the owner
-
release
boolean release(java.lang.String entityId, java.lang.String ownerId)Release a lock exception must not be thrown for this method.- Parameters:
entityId- ID of the entity to lockownerId- ID of the owner if the lock- Returns:
- if the owner held the lock and successfully released it.
-
initialize
void initialize(java.util.Map<java.lang.String,java.lang.String> properties)
Initialize lock manager from catalog properties.- Parameters:
properties- catalog properties
-
-