Class WorkStateHelper

java.lang.Object
org.nuxeo.ecm.core.work.WorkStateHelper

public class WorkStateHelper extends Object
Work state helper to handle, out-of-API, distributed, work states.
Since:
10.2
  • Field Details

  • Method Details

    • getKeyValueStore

      protected static KeyValueStore getKeyValueStore()
    • getLastOffset

      protected static long getLastOffset(String workId)
      Returns the last offset created for a given work id.

      Parameters:
      workId - id of the work whose we want the last offset
      Returns:
      the last offset or -1 for convenience
      Since:
      10.3
    • getOffsetKey

      protected static String getOffsetKey(String workId)
    • getState

      protected static Work.State getState(String workId)
    • getStateKey

      protected static String getStateKey(String workId)
    • getGroupKey

      protected static String getGroupKey(String group)
    • isCanceled

      protected static boolean isCanceled(String workId)
    • setCanceled

      protected static void setCanceled(String workId)
    • setLastOffset

      protected static void setLastOffset(String workId, Long offset, long ttl)
    • setState

      protected static void setState(String workId, Work.State state, long ttl)
    • addGroupJoinWork

      protected static void addGroupJoinWork(String group)
    • removeGroupJoinWork

      protected static boolean removeGroupJoinWork(String group)