本文整理了Java中jadex.commons.collection.LRU.remove()
方法的一些代码示例,展示了LRU.remove()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。LRU.remove()
方法的具体详情如下:
包路径:jadex.commons.collection.LRU
类名称:LRU
方法名:remove
[英]Remove the eldest entry.
[中]删除最年长的条目。
代码示例来源:origin: org.activecomponents.jadex/jadex-commons
/**
* Remove an entry.
* @param key The key.
*/
public boolean remove(Object key)
{
return lru.remove(key)!=null;
}
代码示例来源:origin: net.sourceforge.jadex/jadex-platform-base
/**
* Remove a termination command.
*/
public Runnable removeTerminationCommand(String callid)
{
getRemoteReferenceModule().checkThread();
return terminationcommands.remove(callid);
}
代码示例来源:origin: org.activecomponents.jadex/jadex-platform
/**
* Remove a future command.
*/
public List<Runnable> removeFutureCommands(String callid)
{
getRemoteReferenceModule().checkThread();
return terminationcommands.remove(callid);
}
代码示例来源:origin: net.sourceforge.jadex/jadex-platform
/**
* Remove a future command.
*/
public List<Runnable> removeFutureCommands(String callid)
{
getRemoteReferenceModule().checkThread();
return terminationcommands.remove(callid);
}
代码示例来源:origin: org.activecomponents.jadex/jadex-commons
/**
* Get data from the cache.
* @param key The key.
* @param now The current time (-1 for never expire).
* @return The cached object.
*/
public Object get(Object key, long now)
{
Object ret = null;
CacheEntry ce = (CacheEntry)lru.get(key);
if(ce!=null)
{
if(ce.isExpired(now))
{
// System.out.println("expired: "+ce.getData()+" "+now+" "+ce.getCacheDate()+" "+ce.getTimeToLive());
lru.remove(key);
}
else
{
// System.out.println("not expired: "+ce.getData()+" "+now+" "+ce.getCacheDate()+" "+ce.getTimeToLive());
ret = ce.getData();
}
}
return ret;
}
内容来源于网络,如有侵权,请联系作者删除!