Interface BranchedParamState
-
public interface BranchedParamState
represents parsed value of branched params keys (i.e. keys likeVcsBuildTriggerConstants.LAST_PROCESSED_MOD_ID_PREFIX
-branch=value)- Since:
- 2021.2
-
-
Field Summary
Fields Modifier and Type Field Description static BranchedParamState
EMPTY_STATE
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
containsPerRootModifications()
true if this state stores modification for each root (seegetModificationId(long)
), false otherwisestatic BranchedParamState
createNewState(long lastSeenTime, long modId)
creates new instance of state for global modification id (i.e.static BranchedParamState
createNewState(long lastSeenTime, Map<Long,Long> perRootModIds)
creates new instance of state where each modification is stored per rootstatic BranchedParamState
deserialize(String serialized)
deserialize specified string intoBranchedParamState
objectlong
getLastSeenTime()
long
getModificationId(long vcsRootInstanceId)
when state stores mod id separately for each root returns last processed modification id for specified root or -1 if last processed mod id isn't found for specified root.Set<Long>
getVcsRootIds()
Ids of VCS roots stored in the stateString
serialize()
Serialize this state into string which can be deserialized usingdeserialize(String)
method.
-
-
-
Field Detail
-
EMPTY_STATE
static final BranchedParamState EMPTY_STATE
-
-
Method Detail
-
getLastSeenTime
long getLastSeenTime()
- Returns:
- last seen time for specified branch or -1 if last seen time isn't specified
-
getModificationId
long getModificationId(long vcsRootInstanceId)
when state stores mod id separately for each root returns last processed modification id for specified root or -1 if last processed mod id isn't found for specified root. if state stores one mod id for all roots the method returns this mod id for any vcs root instance id- Parameters:
vcsRootInstanceId
- vcs root instance internal id
-
containsPerRootModifications
boolean containsPerRootModifications()
true if this state stores modification for each root (seegetModificationId(long)
), false otherwise
-
serialize
String serialize()
Serialize this state into string which can be deserialized usingdeserialize(String)
method. This method should return same string for same state.- Returns:
- serialized string which can be stored into custom date storage.
- See Also:
deserialize(String)
-
deserialize
static BranchedParamState deserialize(String serialized)
deserialize specified string intoBranchedParamState
object- See Also:
serialize()
-
createNewState
static BranchedParamState createNewState(long lastSeenTime, long modId)
creates new instance of state for global modification id (i.e. when state stores one mod id for all roots)
-
createNewState
static BranchedParamState createNewState(long lastSeenTime, Map<Long,Long> perRootModIds)
creates new instance of state where each modification is stored per root
-
-