public class GradoopId extends Object implements org.apache.flink.types.NormalizableKey<GradoopId>, org.apache.flink.types.CopyableValue<GradoopId>
ObjectId to guarantee uniqueness. Performance critical
methods, e.g. equals(Object) and hashCode() contain code
copied from ObjectId to avoid unnecessary object instantiations.EPGMIdentifiable,
Serialized Form| Modifier and Type | Field and Description |
|---|---|
static int |
ID_SIZE
Number of bytes to represent an id internally.
|
static GradoopId |
MAX_VALUE
Highest possible Gradoop Id.
|
static GradoopId |
MIN_VALUE
Lowest possible Gradoop Id.
|
static GradoopId |
NULL_VALUE
Represents a null id.
|
| Constructor and Description |
|---|
GradoopId()
Required default constructor for instantiation by serialization logic.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(GradoopId o)
Performs a byte-wise comparison of this and the specified GradoopId.
|
GradoopId |
copy() |
void |
copy(org.apache.flink.core.memory.DataInputView source,
org.apache.flink.core.memory.DataOutputView target) |
void |
copyNormalizedKey(org.apache.flink.core.memory.MemorySegment target,
int offset,
int len) |
void |
copyTo(GradoopId target) |
boolean |
equals(Object o)
Checks if the specified object is equal to the current id.
|
static GradoopId |
fromByteArray(byte[] bytes)
Returns the Gradoop ID represented by a byte array
|
static GradoopId |
fromString(String string)
Returns the Gradoop ID represented by a specified hexadecimal string.
|
static GradoopId |
get()
Returns a new GradoopId
|
int |
getBinaryLength() |
int |
getMaxNormalizedKeyLen() |
int |
hashCode()
Returns the hash code of this GradoopId.
|
static GradoopId |
min(GradoopId first,
GradoopId second)
Compares the given GradoopIds and returns the smaller one.
|
void |
read(org.apache.flink.core.memory.DataInputView in) |
byte[] |
toByteArray()
Returns byte representation of a GradoopId
|
String |
toString()
Returns hex string representation of a GradoopId.
|
void |
write(org.apache.flink.core.memory.DataOutputView out) |
public static final GradoopId NULL_VALUE
public static final GradoopId MAX_VALUE
public static final GradoopId MIN_VALUE
public static final int ID_SIZE
public GradoopId()
public static GradoopId get()
public static GradoopId fromString(String string)
ObjectId.ObjectId(String) to avoid object
instantiation.string - hexadecimal GradoopId representationpublic static GradoopId fromByteArray(byte[] bytes)
bytes - byte representationpublic byte[] toByteArray()
public boolean equals(Object o)
public int hashCode()
ObjectId.hashCode() to avoid object instantiation.public int compareTo(GradoopId o)
compareTo in interface Comparable<GradoopId>o - the object to be compared.public String toString()
ObjectId.toString() to avoid object instantiation.public int getMaxNormalizedKeyLen()
getMaxNormalizedKeyLen in interface org.apache.flink.types.NormalizableKey<GradoopId>public void copyNormalizedKey(org.apache.flink.core.memory.MemorySegment target,
int offset,
int len)
copyNormalizedKey in interface org.apache.flink.types.NormalizableKey<GradoopId>public void write(org.apache.flink.core.memory.DataOutputView out)
throws IOException
write in interface org.apache.flink.core.io.IOReadableWritableIOExceptionpublic void read(org.apache.flink.core.memory.DataInputView in)
throws IOException
read in interface org.apache.flink.core.io.IOReadableWritableIOExceptionpublic int getBinaryLength()
getBinaryLength in interface org.apache.flink.types.CopyableValue<GradoopId>public void copyTo(GradoopId target)
copyTo in interface org.apache.flink.types.CopyableValue<GradoopId>public GradoopId copy()
copy in interface org.apache.flink.types.CopyableValue<GradoopId>public void copy(org.apache.flink.core.memory.DataInputView source,
org.apache.flink.core.memory.DataOutputView target)
throws IOException
copy in interface org.apache.flink.types.CopyableValue<GradoopId>IOExceptionCopyright © 2014 - 2018–2018 University of Leipzig. All rights reserved.