Class VersionManager
java.lang.Object
io.camunda.zeebe.engine.state.deployment.VersionManager
-
Constructor Summary
ConstructorsConstructorDescriptionVersionManager
(long initialValue, ZeebeDb<ZbColumnFamilies> zeebeDb, ZbColumnFamilies columnFamily, TransactionContext transactionContext) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addResourceVersion
(String resourceId, long value, String tenantId) void
clear()
void
deleteResourceVersion
(String resourceId, long version, String tenantId) Deletes a specified version of a resourcefindResourceVersionBefore
(String resourceId, long version, String tenantId) long
getHighestResourceVersion
(String resourceId, String tenantId) Returns the highest version ever deployed for a given resource.long
getHighestResourceVersion
(org.agrona.DirectBuffer resourceId, String tenantId) Returns the highest resource id ever deployed for a given resource.long
getLatestResourceVersion
(String resourceId, String tenantId) Returns the latest known version of a resource.long
getLatestResourceVersion
(org.agrona.DirectBuffer resourceId, String tenantId) Returns the latest known version of a resource.
-
Constructor Details
-
VersionManager
public VersionManager(long initialValue, ZeebeDb<ZbColumnFamilies> zeebeDb, ZbColumnFamilies columnFamily, TransactionContext transactionContext)
-
-
Method Details
-
addResourceVersion
-
deleteResourceVersion
Deletes a specified version of a resource- Parameters:
resourceId
- the id of the resourceversion
- the version that needs to be deletedtenantId
- the tenant id
-
clear
public void clear() -
getLatestResourceVersion
Returns the latest known version of a resource. A resource with this version exists in the state.- Parameters:
resourceId
- the resource idtenantId
- the tenant id- Returns:
- the latest known version of this resource
-
getLatestResourceVersion
Returns the latest known version of a resource. A resource with this version exists in the state.- Parameters:
resourceId
- the resource idtenantId
- the tenant id- Returns:
- the latest known version of this resource
-
getHighestResourceVersion
Returns the highest version ever deployed for a given resource. This resource could already be deleted from the state.- Parameters:
resourceId
- the resource idtenantId
- the tenant id- Returns:
- the highest version ever deployed for this resource id.
-
getHighestResourceVersion
Returns the highest resource id ever deployed for a given resource. This resource could already be deleted from the state.- Parameters:
resourceId
- the resource idtenantId
- the tenant id- Returns:
- the highest version ever deployed for this resource id.
-
findResourceVersionBefore
-