Class VersionManager

java.lang.Object
io.camunda.zeebe.engine.state.deployment.VersionManager

public final class VersionManager extends Object
  • Constructor Details

  • Method Details

    • addResourceVersion

      public void addResourceVersion(String resourceId, long value, String tenantId)
    • deleteResourceVersion

      public void deleteResourceVersion(String resourceId, long version, String tenantId)
      Deletes a specified version of a resource
      Parameters:
      resourceId - the id of the resource
      version - the version that needs to be deleted
      tenantId - the tenant id
    • clear

      public void clear()
    • getLatestResourceVersion

      public long getLatestResourceVersion(String resourceId, String tenantId)
      Returns the latest known version of a resource. A resource with this version exists in the state.
      Parameters:
      resourceId - the resource id
      tenantId - the tenant id
      Returns:
      the latest known version of this resource
    • getLatestResourceVersion

      public long getLatestResourceVersion(org.agrona.DirectBuffer resourceId, String tenantId)
      Returns the latest known version of a resource. A resource with this version exists in the state.
      Parameters:
      resourceId - the resource id
      tenantId - the tenant id
      Returns:
      the latest known version of this resource
    • getHighestResourceVersion

      public long getHighestResourceVersion(String resourceId, String tenantId)
      Returns the highest version ever deployed for a given resource. This resource could already be deleted from the state.
      Parameters:
      resourceId - the resource id
      tenantId - the tenant id
      Returns:
      the highest version ever deployed for this resource id.
    • getHighestResourceVersion

      public long getHighestResourceVersion(org.agrona.DirectBuffer resourceId, String tenantId)
      Returns the highest resource id ever deployed for a given resource. This resource could already be deleted from the state.
      Parameters:
      resourceId - the resource id
      tenantId - the tenant id
      Returns:
      the highest version ever deployed for this resource id.
    • findResourceVersionBefore

      public Optional<Integer> findResourceVersionBefore(String resourceId, long version, String tenantId)