Code example for Lock

Methods: lockunlock

0
    public DMUserListBean loadData() throws WeiboException { 
        DMDao dao = new DMDao(token);
        dao.setCursor(cursor);
 
        DMUserListBean result = null;
        lock.lock();
 
        try { 
            result = dao.getUserList();
        } finally { 
            lock.unlock();
        } 
 
        return result;
    } 
 
} 
 
Connect your IDE to all the code out there  Get Codota for Java