public class VClockUtil extends Object
Constructor and Description |
---|
VClockUtil() |
Modifier and Type | Method and Description |
---|---|
static <T> VClock |
getVClock(T domainObject)
Attempts to get a vector clock from
domainObject by looking for a
RiakVClock annotated field. |
static <T> T |
setVClock(T domainObject,
VClock vclock)
|
public static <T> T setVClock(T domainObject, VClock vclock) throws ConversionException
T
- the type of domainObject
domainObject
- the object to inject the key intovclock
- the vclock to injectdomainObject
with RiakVClock
annotated field
set to vclock
ConversionException
- if there is a RiakVClock
annotated field but it cannot
be set to the value of vclock
public static <T> VClock getVClock(T domainObject)
domainObject
by looking for a
RiakVClock
annotated field. If non-present it simply returns
null
T
- the type of domainObject
domainObject
- the object to search for a keydomainObject
;s
RiakVClock
field or null
Copyright © 2013. All Rights Reserved.