Skip to content

Commit

Permalink
Rename Node to RaptorNode
Browse files Browse the repository at this point in the history
  • Loading branch information
electrum committed Dec 4, 2015
1 parent 42c666c commit 0997280
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
Expand Up @@ -21,12 +21,12 @@

import static java.util.Objects.requireNonNull;

public class Node
public class RaptorNode
{
private final int nodeId;
private final String nodeIdentifier;

public Node(int nodeId, String nodeIdentifier)
public RaptorNode(int nodeId, String nodeIdentifier)
{
this.nodeId = nodeId;
this.nodeIdentifier = requireNonNull(nodeIdentifier, "nodeIdentifier is null");
Expand All @@ -43,13 +43,13 @@ public String getNodeIdentifier()
}

public static class Mapper
implements ResultSetMapper<Node>
implements ResultSetMapper<RaptorNode>
{
@Override
public Node map(int index, ResultSet rs, StatementContext ctx)
public RaptorNode map(int index, ResultSet rs, StatementContext ctx)
throws SQLException
{
return new Node(
return new RaptorNode(
rs.getInt("node_id"),
rs.getString("node_identifier"));
}
Expand Down
Expand Up @@ -134,7 +134,7 @@ private String fetchNode(int id, UUID shardUuid)

private void fetchNodes()
{
for (Node node : dao.getNodes()) {
for (RaptorNode node : dao.getNodes()) {
nodeMap.put(node.getNodeId(), node.getNodeIdentifier());
}
}
Expand Down
Expand Up @@ -68,8 +68,8 @@ long insertShard(
String getNodeIdentifier(@Bind("nodeId") int nodeId);

@SqlQuery("SELECT node_id, node_identifier FROM nodes")
@Mapper(Node.Mapper.class)
List<Node> getNodes();
@Mapper(RaptorNode.Mapper.class)
List<RaptorNode> getNodes();

@SqlQuery("SELECT shard_uuid FROM shards WHERE table_id = :tableId")
List<UUID> getShards(@Bind("tableId") long tableId);
Expand Down

0 comments on commit 0997280

Please sign in to comment.