Package jetbrains.buildServer.serverSide
Class PersistentEntityVersion
- java.lang.Object
-
- com.intellij.openapi.util.Pair<java.lang.Long,java.lang.Long>
-
- jetbrains.buildServer.serverSide.PersistentEntityVersion
-
public class PersistentEntityVersion extends com.intellij.openapi.util.Pair<java.lang.Long,java.lang.Long>
Version ofSPersistentEntity
. Can be used to check if the entity was edited in memory. Contains 2 components, see documentation forgetPersistId()
andgetEditId()
for details.- Since:
- 10.0.3
-
-
Constructor Summary
Constructors Constructor Description PersistentEntityVersion(long persistId, long editId)
PersistentEntityVersion(long persistId, long editId, long persistTime, long editTime, java.util.List<java.lang.String> editStackTrace)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
getEditId()
Returns id of the last edit operation.java.util.List<java.lang.String>
getEditStackTrace()
Returns stackTrace of the last edit operationlong
getEditTime()
Returns timestamp of the last entity edit or -1 if this information is not availablelong
getPersistId()
Returns id of the last persist call.long
getPersistTime()
Returns timestamp of the last persist or -1 if this information is not available
-
-
-
Method Detail
-
getPersistId
public long getPersistId()
Returns id of the last persist call. Id is updated on each call persisting the entity. Changed id means that the entity was persisted since the time previous id was taken. Id can overflow, so the result can be negative. Also if there was 2 * Long.MAX_VALUE + 2 calls to persist between 2 id measurements, then persist cannot be detected.- Returns:
- see above
-
getEditId
public long getEditId()
Returns id of the last edit operation. The id is updated on each edit of this entity in memory and reset to 0 on each call to persist(). A non-zero id means that entity was edited, but not yet persisted. Id can overflow, so the result can be negative. Also if there was 2 * Long.MAX_VALUE + 2 edits since last persist, then id will be 0 and edits cannot be detected.- Returns:
- see above
-
getEditTime
public long getEditTime()
Returns timestamp of the last entity edit or -1 if this information is not available- Returns:
- see above
-
getPersistTime
public long getPersistTime()
Returns timestamp of the last persist or -1 if this information is not available- Returns:
- see above
-
getEditStackTrace
@NotNull public java.util.List<java.lang.String> getEditStackTrace()
Returns stackTrace of the last edit operation- Returns:
- see above
-
-