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 String
s.
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 String
s
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 String
s
bucket
- the bucketkey
- the keytag
- the link tagcharset
- the character asSet for the supplied String
spublic 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 Charset
public String getBucket(Charset charset)
Charset
is used to convert to a String
String
encoded using the supplied Charset
public BinaryValue getBucketAsBytes()
BinaryValue
public String getKey()
Charset
is used to convert to a String
String
encoded using the default Charset
public String getKey(Charset charset)
Charset
is used to convert to a String
String
encoded using the supplied Charset
public BinaryValue getKeyAsBytes()
BinaryValue
public String getTag()
Charset
is used to convert to a String
String
encoded using the default Charset
public String getTag(Charset charset)
Charset
is used to convert to a String
String
encoded using the supplied Charset
public BinaryValue getTagAsBytes()
BinaryValue
Copyright © 2014. All rights reserved.