public class NameIdPair
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static NameIdPair |
NOCHECK |
static int |
NOCHECK_NODE_ID |
static NameIdPair |
NULL |
static int |
NULL_NODE_ID |
Constructor and Description |
---|
NameIdPair(java.lang.String name)
Constructor for a pair where the node ID is as yet unknown.
|
NameIdPair(java.lang.String name,
int id) |
Modifier and Type | Method and Description |
---|---|
static NameIdPair |
deserialize(java.nio.ByteBuffer buffer,
BinaryProtocol protocol)
Serializes from a ByteBuffer for a given protocol.
|
static NameIdPair |
deserialize(TupleInput buffer)
Serializes from a TupleInput after retrieving from storage.
|
boolean |
equals(java.lang.Object obj) |
int |
getId()
Returns the internally generated compact id.
|
java.lang.String |
getName()
Returns the application assigned name
|
int |
hashCode() |
boolean |
hasNullId() |
void |
revertToNull() |
void |
serialize(java.nio.ByteBuffer buffer,
BinaryProtocol protocol)
Serializes into a ByteBuffer for a given protocol.
|
void |
serialize(TupleOutput buffer)
Serializes into a TupleOutput before storing.
|
int |
serializedSize(BinaryProtocol protocol)
Returns serialized for a given protocol.
|
void |
setId(int id) |
java.lang.String |
toString() |
void |
update(NameIdPair other) |
public static final int NULL_NODE_ID
public static final int NOCHECK_NODE_ID
public static final NameIdPair NULL
public static final NameIdPair NOCHECK
public NameIdPair(java.lang.String name, int id)
public NameIdPair(java.lang.String name)
public static NameIdPair deserialize(java.nio.ByteBuffer buffer, BinaryProtocol protocol)
public static NameIdPair deserialize(TupleInput buffer)
public void serialize(java.nio.ByteBuffer buffer, BinaryProtocol protocol)
public void serialize(TupleOutput buffer)
public int serializedSize(BinaryProtocol protocol)
public java.lang.String getName()
public java.lang.String toString()
toString
in class java.lang.Object
public int getId()
public boolean hasNullId()
public void setId(int id)
public void revertToNull()
public void update(NameIdPair other)
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
Copyright (c) 2004-2012 Oracle. All rights reserved.