/** * {@inheritDoc} * * <p>Note that this method is atomic, i.e. synchronized.</p> * * @param key {@inheritDoc} * @param timestamp {@inheritDoc} * @return {@inheritDoc} */ public synchronized C getOrCreate(String key, long timestamp) { Entry<C> entry = getFromEitherMap(key); if (entry == null) { C c = buildComponent(key); entry = new Entry(key, c, timestamp); // new entries go into the main map liveMap.put(key, entry); } else { entry.setTimestamp(timestamp); } return entry.component; }
/** * {@inheritDoc} * * <p>Note that this method is atomic, i.e. synchronized.</p> * * @param key {@inheritDoc} * @param timestamp {@inheritDoc} * @return {@inheritDoc} */ public synchronized C getOrCreate(String key, long timestamp) { Entry<C> entry = getFromEitherMap(key); if (entry == null) { C c = buildComponent(key); entry = new Entry<C>(key, c, timestamp); // new entries go into the main map liveMap.put(key, entry); } else { entry.setTimestamp(timestamp); } return entry.component; }
/** * {@inheritDoc} * * <p>Note that this method is atomic, i.e. synchronized.</p> * * @param key {@inheritDoc} * @param timestamp {@inheritDoc} * @return {@inheritDoc} */ public synchronized C getOrCreate(String key, long timestamp) { Entry<C> entry = getFromEitherMap(key); if (entry == null) { C c = buildComponent(key); entry = new Entry<C>(key, c, timestamp); // new entries go into the main map liveMap.put(key, entry); } else { entry.setTimestamp(timestamp); } return entry.component; }
/** * {@inheritDoc} * * <p>Note that this method is atomic, i.e. synchronized.</p> * * @param key {@inheritDoc} * @param timestamp {@inheritDoc} * @return {@inheritDoc} */ public synchronized C getOrCreate(String key, long timestamp) { Entry<C> entry = getFromEitherMap(key); if (entry == null) { C c = buildComponent(key); entry = new Entry(key, c, timestamp); // new entries go into the main map liveMap.put(key, entry); } else { entry.setTimestamp(timestamp); } return entry.component; }
/** * {@inheritDoc} * * <p>Note that this method is atomic, i.e. synchronized.</p> * * @param key {@inheritDoc} * @param timestamp {@inheritDoc} * @return {@inheritDoc} */ public synchronized C getOrCreate(String key, long timestamp) { Entry<C> entry = getFromEitherMap(key); if (entry == null) { C c = buildComponent(key); entry = new Entry<C>(key, c, timestamp); // new entries go into the main map liveMap.put(key, entry); } else { entry.setTimestamp(timestamp); } return entry.component; }
/** * {@inheritDoc} * * <p>Note that this method is atomic, i.e. synchronized.</p> * * @param key {@inheritDoc} * @param timestamp {@inheritDoc} * @return {@inheritDoc} */ public synchronized C getOrCreate(String key, long timestamp) { Entry<C> entry = getFromEitherMap(key); if (entry == null) { C c = buildComponent(key); entry = new Entry<C>(key, c, timestamp); // new entries go into the main map liveMap.put(key, entry); } else { entry.setTimestamp(timestamp); } return entry.component; }