Code example for Lock

Methods: lockunlock

0
    public UserListBean loadData() throws WeiboException { 
        SearchDao dao = new SearchDao(token, searchWord);
        dao.setPage(page);
 
        UserListBean result = null;
        lock.lock();
 
        try { 
            result = dao.getUserList();
        } finally { 
            lock.unlock();
        } 
 
 
        return result;
    } 
 
} 
Stop searching for code, let great code find you!  Add Codota to your java IDE