jadex.commons.collection.LRU.get()方法的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(6.5k)|赞(0)|评价(0)|浏览(193)

本文整理了Java中jadex.commons.collection.LRU.get()方法的一些代码示例,展示了LRU.get()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。LRU.get()方法的具体详情如下:
包路径:jadex.commons.collection.LRU
类名称:LRU
方法名:get

LRU.get介绍

[英]Get the cleaner object.
[中]获取更干净的对象。

代码示例

代码示例来源:origin: org.activecomponents.jadex/jadex-commons

/**
 *  Test if an entry can expire.
 *  @param key The key.
 *  @return True, if entry can expire.
 */
public boolean canExpire(Object key)
{
  boolean ret = true;
  CacheEntry ce = (CacheEntry)lru.get(key);
  if(ce!=null)
  {
    ret = ce.getCacheDate()!=-1;
  }
  return ret;
}

代码示例来源:origin: org.activecomponents.jadex/jadex-json

Object val = lru.get(keys[i]);
Class<?> valclazz = val!=null? val.getClass(): null;
Object key = keys[i];
Object val = lru.get(keys[i]);
Class<?> valclazz = val!=null? val.getClass(): null;
traverser.doTraverse(val, valclazz, traversed, processors, clone, targetcl, context);

代码示例来源:origin: net.sourceforge.jadex/jadex-platform

/**
 *  Add a future command.
 */
public void addFutureCommand(String callid, Runnable command)
{
  getRemoteReferenceModule().checkThread();
  
  List<Runnable> coms = terminationcommands.get(callid);
  if(coms==null)
  {
    coms = new ArrayList<Runnable>();
    terminationcommands.put(callid, coms);
  }
  coms.add(command);
}

代码示例来源:origin: org.activecomponents.jadex/jadex-platform

/**
 *  Add a future command.
 */
public void addFutureCommand(String callid, Runnable command)
{
  getRemoteReferenceModule().checkThread();
  
  List<Runnable> coms = terminationcommands.get(callid);
  if(coms==null)
  {
    coms = new ArrayList<Runnable>();
    terminationcommands.put(callid, coms);
  }
  coms.add(command);
}

代码示例来源:origin: org.activecomponents.jadex/jadex-commons

Long    lastmod    = LASTMODS.get(path);
if(lastmod!=null)

代码示例来源:origin: org.activecomponents.jadex/jadex-editor-bpmn

/**
 *  Gets a visual element by BPMN id.
 *  
 *  @param id The ID.
 *  @return The element, null if not found.
 */
public VElement getVisualElementById(mxICell startelement, String id)
{
  VElement ret = elementidcache.get(id);
  
  if (ret == null)
  {
    ret = findElementById(startelement, id);
    elementidcache.put(id, ret);
  }
  
  return ret;
}

代码示例来源:origin: org.activecomponents.jadex/jadex-commons

System.arraycopy(imports, 0, keys, 3, imports.length);
Tuple    keytuple    = new Tuple(keys);
cached    = modelcache.get(keytuple);

代码示例来源:origin: org.activecomponents.jadex/jadex-commons

ret = beaninfos.get(beaninfokey);

代码示例来源:origin: net.sourceforge.jadex/jadex-platform-base

/**
 *  Get a send target manager for addresses.
 */
public SendManager getSendManager(IComponentIdentifier cid)
{
  SendManager ret = managers.get(cid.getRoot());
  
  if(ret==null)
  {
    ret = new SendManager();
    managers.put(cid.getRoot(), ret);
  }
  
  return ret;
}

代码示例来源:origin: org.activecomponents.jadex/jadex-platform

/**
 *  Get a send target manager for addresses.
 */
public SendManager getSendManager(IComponentIdentifier cid)
{
  SendManager ret = managers.get(cid.getRoot());
  
  if(ret==null)
  {
    ret = new SendManager();
    managers.put(cid.getRoot(), ret);
  }
  
  return ret;
}

代码示例来源:origin: net.sourceforge.jadex/jadex-platform

/**
 *  Get a send target manager for addresses.
 */
public SendManager getSendManager(IComponentIdentifier cid)
{
  SendManager ret = managers.get(cid.getRoot());
  
  if(ret==null)
  {
    ret = new SendManager();
    managers.put(cid.getRoot(), ret);
  }
  
  return ret;
}

代码示例来源: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;
  }

代码示例来源:origin: org.activecomponents.jadex/jadex-commons

Tuple2<Long, String>    entry    = HASHES.get(path);
String    hash    =    entry!=null ? entry.getSecondEntity() : null;

代码示例来源:origin: org.activecomponents.jadex/jadex-bridge

/**
 *  Test if the interceptor is applicable.
 *  @return True, if applicable.
 */
public final boolean isApplicable(ServiceInvocationContext context)
{
  boolean ret = false;
  if(super.isApplicable(context))
  {
    Boolean app = applicables.get(context.getMethod());
    if(app!=null)
    {
      ret = app.booleanValue();
    }
    else
    {
      ret = customIsApplicable(context);
      applicables.put(context.getMethod(), ret? Boolean.TRUE: Boolean.FALSE);
    }
  }
  return ret;
}

代码示例来源:origin: net.sourceforge.jadex/jadex-bridge

/**
 *  Test if the interceptor is applicable.
 *  @return True, if applicable.
 */
public final boolean isApplicable(ServiceInvocationContext context)
{
  boolean ret = false;
  if(super.isApplicable(context))
  {
    Boolean app = applicables.get(context.getMethod());
    if(app!=null)
    {
      ret = app.booleanValue();
    }
    else
    {
      ret = customIsApplicable(context);
      applicables.put(context.getMethod(), ret? Boolean.TRUE: Boolean.FALSE);
    }
  }
  return ret;
}

代码示例来源:origin: org.activecomponents.jadex/jadex-platform-extension-webservice-desktop-grizzly

/**
 *  Get or generate a proxy class.
 */
protected Class<?> getProxyClass(IServiceIdentifier serviceid, ClassLoader classloader, 
  Class<?> baseclass, Map<String, Object> mapprops) throws Exception
{
  Class<?> iface = serviceid.getServiceType().getType(classloader);
  Class<?> ret = proxyclasses.get(new Tuple2<Class<?>, Class<?>>(iface, baseclass));
  if(ret==null)
  {
    List<RestMethodInfo> rmis = generator.generateRestMethodInfos(serviceid, classloader, baseclass, mapprops);
    ret = createProxyClass(serviceid, classloader, baseclass, mapprops, rmis);
    proxyclasses.put(new Tuple2<Class<?>, Class<?>>(iface, baseclass), ret);
  }
  return ret;
}

代码示例来源:origin: net.sourceforge.jadex/jadex-platform-extension-webservice-desktop

/**
 *  Get or generate a proxy class.
 */
protected Class<?> getProxyClass(IService service, ClassLoader classloader, 
  Class<?> baseclass, Map<String, Object> mapprops) throws Exception
{
  Class<?> iface = service.getServiceIdentifier().getServiceType().getType(classloader);
  Class<?> ret = proxyclasses.get(new Tuple2<Class<?>, Class<?>>(iface, baseclass));
  if(ret==null)
  {
    List<RestMethodInfo> rmis = generator.generateRestMethodInfos(service, classloader, baseclass, mapprops);
    ret = createProxyClass(service, classloader, baseclass, mapprops, rmis);
    proxyclasses.put(new Tuple2<Class<?>, Class<?>>(iface, baseclass), ret);
  }
  return ret;
}

代码示例来源:origin: org.activecomponents.jadex/jadex-commons

cached    = modelcache.get(keytuple);
  cached    = modelcache.get(new Tuple(new Object[]{info.getFilename()}));
  if(cached!=null)

代码示例来源:origin: org.activecomponents.jadex/jadex-platform

Date date = releasedatecache.get(rec.getRoot());
crl.resultAvailable(date);

代码示例来源:origin: net.sourceforge.jadex/jadex-platform

Date date = releasedatecache.get(rec.getRoot());
crl.resultAvailable(date);

相关文章