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
|
Constructor Summary |
VersionedId(long id)
Creates a versioned identifier with the initial version. |
VersionedId(long id,
long version)
|
INITIAL_VERSION
public static final long INITIAL_VERSION
- See Also:
- Constant Field Values
VersionedId
public VersionedId(long id)
- Creates a versioned identifier with the initial version. Used when first
creating an entity with a predefined id.
VersionedId
public VersionedId(long id,
long version)
getId
public long getId()
getVersion
public long getVersion()
hashCode
public int hashCode()
- Overrides:
hashCode in class Object
equals
public boolean equals(Object obj)
- Overrides:
equals in class Object
toString
public String toString()
- Overrides:
toString in class Object
parse
public static VersionedId parse(String s)
Copyright © 2008-2015 RIPE NCC, the Netherlands. All Rights Reserved.