M
miles^o^
Unregistered / Unconfirmed
GUEST, unregistred user!
String keyword_ekey = KEYWORD_ID + keywordKey;
KeywordDO _do = null;
synchronized (kbCache)
{
_do = (KeywordDO)kbCache.get( keyword_ekey );
if ( _do == null )
{
_do = KeywordDB.get( keywordKey );
try {
kbCache.put( keyword_ekey, _do );
} catch ( endoworks.services.cache.ObjectExistsException e )
{
logger.logp("xxxxxxxxxx"
}
}
}
这段代码里面synchronized (kbCache){}是什么意思啊?起什么作用?
KeywordDO _do = null;
synchronized (kbCache)
{
_do = (KeywordDO)kbCache.get( keyword_ekey );
if ( _do == null )
{
_do = KeywordDB.get( keywordKey );
try {
kbCache.put( keyword_ekey, _do );
} catch ( endoworks.services.cache.ObjectExistsException e )
{
logger.logp("xxxxxxxxxx"
}
}
}
这段代码里面synchronized (kbCache){}是什么意思啊?起什么作用?