public class NodeRecord extends PersistentRecord
| Modifier and Type | Field and Description |
|---|---|
static Class<NodeRecord> |
_R |
static ColumnExp<String> |
HOST_NAME |
String |
hostName
The DNS name used to connect to this node by other peers.
|
static ColumnExp<Timestamp> |
LAST_UPDATED |
Timestamp |
lastUpdated
The last time this node has reported in.
|
static ColumnExp<String> |
NODE_NAME |
String |
nodeName
The unique name assigned to this node.
|
int |
port
The port on which to connect to this node.
|
static ColumnExp<Integer> |
PORT |
static ColumnExp<String> |
PUBLIC_HOST_NAME |
String |
publicHostName
The DNS name used to connect to this node by normal clients.
|
String |
region
The region in which the node exists.
|
static ColumnExp<String> |
REGION |
static int |
SCHEMA_VERSION
Increment this value if you modify the definition of this persistent
object in a way that will result in a change to its SQL counterpart.
|
boolean |
shutdown
Whether or not this node is explicitly shut down.
|
static ColumnExp<Boolean> |
SHUTDOWN |
| Constructor and Description |
|---|
NodeRecord()
Used to create a blank instance when loading from the database.
|
NodeRecord(String nodeName)
Used for queries.
|
NodeRecord(String nodeName,
String hostName,
String publicHostName,
String region,
int port)
Creates a record for the specified node.
|
| Modifier and Type | Method and Description |
|---|---|
static Key<NodeRecord> |
getKey(String nodeName)
Create and return a primary
Key to identify a NodeRecord
with the supplied key values. |
String |
getPeerHostName(String region)
Returns the host name to which peers in the specified region should connect.
|
String |
toString() |
clonepublic static final Class<NodeRecord> _R
public static final int SCHEMA_VERSION
public String nodeName
public String hostName
public String publicHostName
public String region
public int port
public Timestamp lastUpdated
public boolean shutdown
public NodeRecord()
public NodeRecord(String nodeName, String hostName, String publicHostName, String region, int port)
public NodeRecord(String nodeName)
public String getPeerHostName(String region)
public static Key<NodeRecord> getKey(String nodeName)
Key to identify a NodeRecord
with the supplied key values.Copyright © 2015. All rights reserved.