public class GlobalId extends Object implements Comparable
Modifier and Type | Field and Description |
---|---|
static int |
LENGTH
The number of bytes in a global id.
|
private byte[] |
raw |
Constructor and Description |
---|
GlobalId(byte[] raw)
Constructs a new global id by copying the content of the given raw byte array.
|
GlobalId(com.yahoo.vespa.objects.Deserializer buf)
Constructs a global id by deserializing content from the given byte buffer.
|
GlobalId(IdString id)
Constructs a new global id from a document id string.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(Object o) |
boolean |
equals(Object obj) |
byte[] |
getRawId()
Returns the raw byte array that constitutes this global id.
|
int |
hashCode() |
void |
serialize(com.yahoo.vespa.objects.Serializer buf)
Serializes the content of this global id into the given byte buffer.
|
BucketId |
toBucketId() |
String |
toString() |
public static final int LENGTH
private final byte[] raw
public GlobalId(byte[] raw)
raw
- The array to copy.public GlobalId(IdString id)
id
- The document id to derive from.public GlobalId(com.yahoo.vespa.objects.Deserializer buf)
buf
- The buffer to deserialize from.public void serialize(com.yahoo.vespa.objects.Serializer buf)
buf
- The buffer to serialize to.public byte[] getRawId()
public BucketId toBucketId()
public int compareTo(Object o)
compareTo
in interface Comparable
Copyright © 2017. All rights reserved.