Class SnapshotVersion
java.lang.Object
org.apache.cayenne.access.SnapshotVersion
Incrementing global snapshot version generator. A version is taken once per operation that produces snapshots, i.e.
once per SQL statement result, per commit and per snapshot event, and every
DataRow the operation produces
carries it, as does every object created from or committed as such a row.- Since:
- 5.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final longThe version of a snapshot that belongs to no operation: one built for a caller and neither cached nor compared, such as the one returned byDataContext.currentSnapshot(..). -
Method Summary
-
Field Details
-
NONE
public static final long NONEThe version of a snapshot that belongs to no operation: one built for a caller and neither cached nor compared, such as the one returned byDataContext.currentSnapshot(..). It is also the version of an object that was never loaded from or committed as a snapshot.- See Also:
-
-
Method Details
-
next
public static long next()Returns the version of a new operation, greater than any version returned before, and neverNONE.
-