Updates to support a public facing and back-channel host for each node.

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4254 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Michael Bayne
2006-07-06 23:52:55 +00:00
parent 8df1c91699
commit c0628363cb
3 changed files with 33 additions and 7 deletions
@@ -33,9 +33,12 @@ public class NodeRecord
/** The unique name assigned to this node. */
public String nodeName;
/** The DNS name of the server running this node. */
/** The DNS name used to connect to this node by other peers. */
public String hostName;
/** The DNS name used to connect to this node by normal clients. */
public String publicHostName;
/** The port on which to connect to this node. */
public int port;
@@ -48,10 +51,12 @@ public class NodeRecord
}
/** Creates a record for the specified node. */
public NodeRecord (String nodeName, String hostName, int port)
public NodeRecord (String nodeName, String hostName, String publicHostName,
int port)
{
this.nodeName = nodeName;
this.hostName = hostName;
this.publicHostName = publicHostName;
this.port = port;
}
@@ -80,10 +80,16 @@ public class NodeRepository extends JORARepository
JDBCUtil.createTableIfMissing(conn, "NODES", new String[] {
"NODE_NAME VARCHAR(64) NOT NULL",
"HOST_NAME VARCHAR(64) NOT NULL",
"PUBLIC_HOST_NAME VARCHAR(64) NOT NULL",
"PORT INTEGER NOT NULL",
"LAST_UPDATED TIMESTAMP NOT NULL",
"PRIMARY KEY (NODE_NAME)",
}, "");
// TEMP: add our new column
JDBCUtil.addColumn(conn, "NODES", "PUBLIC_HOST_NAME",
"VARCHAR(64) NOT NULL", "HOST_NAME");
// END TEMP
}
@Override // documentation inherited