public class RiakLink extends Object
Links are metadata that establish one-way relationships between objects in Riak. They can be used to loosely model graph like relationships between objects in Riak.
Data in Riak is character asSet agnostic; it's simply raw bytes. Methods are provided here
to either use your default character asSet or supply a specific one to convert to and
from Strings.
| Constructor and Description |
|---|
RiakLink(BinaryValue bucket,
BinaryValue key,
BinaryValue tag)
Create a RiakLink from the specified parameters.
|
RiakLink(RiakLink riakLink)
Create a RiakLink that is a copy of another RiakLink.
|
RiakLink(String bucket,
String key,
String tag)
Create a RiakLink from the specified parameters.
|
RiakLink(String bucket,
String key,
String tag,
Charset charset)
Create a RiakLink from the specified parameters.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
String |
getBucket()
Get the bucket for this RiakLink as a String
|
String |
getBucket(Charset charset)
Get the bucket for this RiakLink as a String
|
BinaryValue |
getBucketAsBytes()
Get the bucket as a wrapped byte array
|
String |
getKey()
Get the key for this RiakLink as a String
|
String |
getKey(Charset charset)
Get the key for this RiakLink as a String
|
BinaryValue |
getKeyAsBytes()
Return the key as a wrapped byte array
|
String |
getTag()
Get the tag for this RiakLink as a String
|
String |
getTag(Charset charset)
Get the tag for this RiakLink as a String
|
BinaryValue |
getTagAsBytes()
Get the tag as bytes
|
int |
hashCode() |
String |
toString() |
public RiakLink(String bucket, String key, String tag)
The values are stored internally as bytes. The default Charset will
be used to convert the supplied Strings
bucket - the bucket namekey - the keytag - the link tagpublic RiakLink(String bucket, String key, String tag, Charset charset)
The values are stored internally as bytes. The supplied Charset will
be used to convert the supplied Strings
bucket - the bucketkey - the keytag - the link tagcharset - the character asSet for the supplied Stringspublic RiakLink(BinaryValue bucket, BinaryValue key, BinaryValue tag)
bucket - the bucket namekey - the keytag - the link tagpublic RiakLink(RiakLink riakLink)
riakLink - the RiakLink to copypublic String getBucket()
Charset
is used to convert to a String
String encoded using the default Charsetpublic String getBucket(Charset charset)
Charset
is used to convert to a String
String encoded using the supplied Charsetpublic BinaryValue getBucketAsBytes()
BinaryValuepublic String getKey()
Charset
is used to convert to a String
String encoded using the default Charsetpublic String getKey(Charset charset)
Charset
is used to convert to a String
String encoded using the supplied Charsetpublic BinaryValue getKeyAsBytes()
BinaryValuepublic String getTag()
Charset
is used to convert to a String
String encoded using the default Charsetpublic String getTag(Charset charset)
Charset
is used to convert to a String
String encoded using the supplied Charsetpublic BinaryValue getTagAsBytes()
BinaryValueCopyright © 2015. All rights reserved.