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

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

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

LRU.put介绍

暂无

代码示例

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

/**
 *  Put an entry in the cache.
 *  @param key The key.
 *  @param value The value.
 *  @param now The current time (-1 for never expire).
 */
public void put(Object key, Object value, long now, long ttl)
{
  CacheEntry ce = new CacheEntry(value, now, ttl);
  lru.put(key, ce);
}

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

/**
 *  Add a termination command.
 */
public void addTerminationCommand(String callid, Runnable command)
{
  getRemoteReferenceModule().checkThread();
  
  terminationcommands.put(callid, command);
}

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

public void exceptionOccurred(Exception exception)
  {
    releasedatecache.put(rec.getRoot(), null);
    crl.resultAvailable(null);
  }
});

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

public void exceptionOccurred(Exception exception)
  {
    releasedatecache.put(rec.getRoot(), null);
    crl.resultAvailable(null);
  }
});

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

LASTMODS.put(path, Long.valueOf(ret));

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

beaninfos.put(beaninfokey, ret);

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

HASHES.put(path, new Tuple2<Long, String>(Long.valueOf(getLastModified(f)), hash));
saveHashCache();

代码示例来源: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: org.activecomponents.jadex/jadex-json

ret.put(name, newval);
if(val != Traverser.IGNORE_RESULT)
  ret.put(key, val);

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

modelcache.put(keytuple, cached);
modelcache.put(new Tuple(new Object[]{info.getFilename()}), cached);
modelcache.put(keytuple, cached);

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

/**
 *  Decodes and adds sub-objects during decoding.
 *  
 *  @param object The instantiated object.
 *  @param clazz The class of the object.
 *  @param context The decoding context.
 *  @return The finished object.
 */
public Object decodeSubObjects(Object object, Class<?> clazz, IDecodingContext context)
{
  LRU ret = (LRU) object;
  
  int maxentries = (int) context.readVarInt();
  ret.setMaxEntries(maxentries);
  
  ILRUEntryCleaner cleaner = (ILRUEntryCleaner) BinarySerializer.decodeObject(context);
  ret.setCleaner(cleaner);
  
  int size = (int) context.readVarInt();
  for (int i = 0; i < size; ++i)
  {
    Object key = BinarySerializer.decodeObject(context);
    Object value = BinarySerializer.decodeObject(context);
    ret.put(key, value);
  }
  
  return ret;
}

相关文章