Annotation Type | Description |
---|---|
RiakBucketName |
Annotates a field or getter/setter method pair in a class to serve as the bucket name.
|
RiakBucketType |
Annotates a field or getter/setter method pair in a class to server as the bucket type.
|
RiakContentType |
Annotates a field or getter/setter method pair in a class to serve as the content-type.
|
RiakIndex |
Annotates a field or getter/setter method pair in a class to serve as a RiakIndex.
|
RiakKey |
Annotates a field or getter/setter method pair in a class to serve as the key.
|
RiakLastModified |
Annotates a field or setter method in a class to store last modified.
|
RiakLinks |
Annotates a field or getter/setter method pair in a class to serve as a set of links.
|
RiakTombstone |
Annotates a field or getter/setter method pair in a class to serve as the tombstone indicator.
|
RiakUsermeta |
Annotates a field or getter/setter method pair in a class to serve as containing user meta data for a Riak
object.
|
RiakVClock |
Annotates a field or getter/setter method pair in a class to serve as the vector clock.
|
RiakVTag |
Annotates a field or setter method in a class to store the VTag.
|
In addition, the Converter
interface allows for serialization/deserialization for the data portion.
By annotating your own domain object, you can simply pass an instance of it
to StoreValue
.
When fetching data from Riak, the reverse is also true. The FetchValue.Response
handles injecting your domain object with any of the annotated values.
Raw types as well as Generic types are supported. The latter is done via Jackson's
TypeReferece
class.
public class AnnotatedPojo
{
@RiakBucketType
public String bucketType;
@RiakBucketName
public String bucketName;
@RiakKey
public String key;
@RiakVClock
VClock clock;
public String value;
}
Copyright © 2014. All rights reserved.