Class SqlLeaseContext
- java.lang.Object
-
- org.eclipse.dataspaceconnector.sql.lease.SqlLeaseContext
-
- All Implemented Interfaces:
org.eclipse.dataspaceconnector.spi.persistence.LeaseContext
public class SqlLeaseContext extends java.lang.Object implements org.eclipse.dataspaceconnector.spi.persistence.LeaseContextSQL-based implementation of the LeaseContext. Acquiring a lease is implemented by adding an entry into the "lease" table in the database Breaking a lease is implemented by deleting the respective entry
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidacquireLease(java.lang.String entityId)voidbreakLease(java.lang.String entityId)@Nullable SqlLeasegetLease(java.lang.String entityId)Fetches a lease for a particular entity
-
-
-
Method Detail
-
breakLease
public void breakLease(java.lang.String entityId)
- Specified by:
breakLeasein interfaceorg.eclipse.dataspaceconnector.spi.persistence.LeaseContext
-
acquireLease
public void acquireLease(java.lang.String entityId)
- Specified by:
acquireLeasein interfaceorg.eclipse.dataspaceconnector.spi.persistence.LeaseContext
-
getLease
@Nullable public @Nullable SqlLease getLease(java.lang.String entityId)
Fetches a lease for a particular entity- Parameters:
entityId- The leased entity's ID (NOT the leaseID!)- Returns:
- The respective lease, or null of entity is not leased.
-
-