private void getLatestThreads(Map<String, Object> jsonrpc2Params) throws Exception {
        Map<String, Object> params = getParams(jsonrpc2Params,
                new NullableExtendedParam(Constants.Param.Name.LIMIT, true));

        Integer limit = (Integer) params.get(Constants.Param.Name.LIMIT);
        if(limit == null){
            limit = Constants.Database.DEFAULT_LATEST_THREADS_LIMIT;
        }

        List<models.Thread> threads = getAllColumns(models.Thread.class);
        Collections.sort(threads, timeSort());

        List<models.Thread> returnThreads = new LinkedList<models.Thread>();
        for(int i= 0; i<limit && i<threads.size(); i++){
            returnThreads.add(threads.get(i));
        }

        responseParams.put(Constants.Param.Name.THREADS, serialize(returnThreads));
        responseParams.put(Constants.Param.Status.STATUS, Constants.Param.Status.SUCCESS);
    }