Package net.ripe.rpki.commons.util
Class VersionedId
- java.lang.Object
-
- net.ripe.rpki.commons.util.VersionedId
-
- All Implemented Interfaces:
Serializable
public class VersionedId extends Object implements Serializable
A versioned identifier to uniquely identify a specific version of an entity. This is used to implement optimistic locking.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static longINITIAL_VERSION
-
Constructor Summary
Constructors Constructor Description VersionedId(long id)Creates a versioned identifier with the initial version.VersionedId(long id, long version)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)longgetId()longgetVersion()inthashCode()static VersionedIdparse(String s)StringtoString()
-
-
-
Field Detail
-
INITIAL_VERSION
public static final long INITIAL_VERSION
- See Also:
- Constant Field Values
-
-
Method Detail
-
getId
public long getId()
-
getVersion
public long getVersion()
-
parse
public static VersionedId parse(String s)
-
-