Package de.hybris.platform.core.system
Interface InitializationLockDao
-
- All Superinterfaces:
java.io.Serializable
- All Known Implementing Classes:
DefaultInitLockDao
public interface InitializationLockDao extends java.io.SerializableDatabase specific logic forInitializationLockHandler.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidcreateTable()Optionally creates table.longgetUniqueInstanceIdentifier()Identifier specific for running platform.booleaninsertRow()Optionally inserts lock row.booleanlockRow(Tenant forTenant, java.lang.String processName)Locks row using cluster node ID from given tenant.InitializationLockInforeadLockInfo()Reads current locking information.booleanreleaseRow(Tenant forTenant)Releases existing lock.
-
-
-
Method Detail
-
readLockInfo
InitializationLockInfo readLockInfo()
Reads current locking information.- Returns:
nullif no lock row or table exists, the info object otherwise
-
releaseRow
boolean releaseRow(Tenant forTenant)
Releases existing lock. Tenant must have cluster node ID that matches the one inside the lock!
-
lockRow
boolean lockRow(Tenant forTenant, java.lang.String processName)
Locks row using cluster node ID from given tenant. Requires lock not being taken before (no matter by which cluster node!).
-
insertRow
boolean insertRow()
Optionally inserts lock row.- Returns:
trueif row could be inserted or row already exists,falseon other errors (e.g. table not existing)
-
createTable
void createTable()
Optionally creates table. If table already exists it does nothing.
-
getUniqueInstanceIdentifier
long getUniqueInstanceIdentifier()
Identifier specific for running platform. Every platform startup standalone or other should have own unique identifier.
-
-