public List<Map<String,String>> list(Database conn) throws SQLException {
  ResultSet rs=null;
  Statement statement=conn.createStatement();
  List<Map<String,String>> shardToChannels=new ArrayList<Map<String,String>>();
  try {
    rs=statement.executeQuery(select);
    while (rs.next()) {
      Map<String,String> shard=new HashMap<String,String>();
      shard.put(ShardChannelTable.SHARD_ID_COL,rs.getString(ShardChannelTable.SHARD_ID_COL));
      shard.put(ShardChannelTable.CHANNEL_COL,rs.getString(ShardChannelTable.CHANNEL_COL));
      shardToChannels.add(shard);
    }
  }
  finally {
    close(rs);
    close(statement);
  }
  return shardToChannels;
}

public List < Map < String , String > > list ( Database conn ) throws SQLException { ResultSet rs = null ; Statement statement = conn . createStatement ( ) ; List < Map < String , String > > shardToChannels = new ArrayList < Map < String , String > > ( ) ; try { rs = statement . executeQuery ( select ) ; while ( rs . next ( ) ) { Map < String , String > shard = new HashMap < String , String > ( ) ; shard . put ( ShardChannelTable . SHARD_ID_COL , rs . getString ( ShardChannelTable . SHARD_ID_COL ) ) ; shard . put ( ShardChannelTable . CHANNEL_COL , rs . getString ( ShardChannelTable . CHANNEL_COL ) ) ; shardToChannels . add ( shard ) ; } } finally { close ( rs ) ; close ( statement ) ; } return shardToChannels ; }
return a list of currently known shard / channel assignments .
