/*
(non-Javadoc)

@see com.jk.cache.CacheManager#get(java.lang.Object, java.lang.Class)
487629
@Override
	public <T> T get(final Object key, final Class<T> clas) {
		this.logger.debug("@get :", key, " with class : ", clas.getName());
		final T Object = (T) getCachableMap(clas).get(key);
		logger.debug("Cached object : ", Object);
		return Object;
	}
678320
public <T> T get(Class<T> clazz, final String name)
	{
		JAXBNamedResourceFactory<T> cached = cachedReferences.get(name);

		if (cached == null)
		{
			cached = new JAXBNamedResourceFactory<T>(this.config, this.factory, name, clazz);
			cachedReferences.put(name, cached);
		}

		return cached.get();
	}
346523
@SuppressWarnings("unchecked")
    public V get(Object key) {
        synchronized( this ) {
            //WeakReference ref;
            SoftReference ref;
            V item;
            
            if( !containsKey(key) ) {
                return null;
            }
            ref = cache.get(key);
            item = (V)ref.get();
            if( item == null ) {
                return null;
            }
            if( item instanceof CachedItem ) {
                CachedItem ci = (CachedItem)item;
                
                if( ci.isValidForCache() ) {
                    return item;
                }
                remove(key);
                return null;
            }
            return item;
        }
    }
1128544
@SuppressWarnings("unchecked")
    protected <T> T getFromCache(String cacheName, String key, Class<T> clazz) {
        Object obj = getFromCache(cacheName, key);
        if (obj == null) {
            return null;
        }
        if (clazz.isAssignableFrom(obj.getClass())) {
            return (T) obj;
        }
        return null;
    }
623581
@Override
    public Object get(String name, ObjectFactory<?> objectFactory) {
        final HttpSession session = this.getPortalSesion(true);

        final Object sessionMutex = WebUtils.getSessionMutex(session);
        synchronized (sessionMutex) {
            Object scopedObject = session.getAttribute(name);
            if (scopedObject == null) {
                scopedObject = objectFactory.getObject();
                session.setAttribute(name, scopedObject);
            }

            return scopedObject;
        }
    }
1049915
public Object get(Class entityClass, Serializable id) throws Exception {
		return get(entityClass, id, null);
	}
731855
@Override
    public <T> T get(EntityGetOperation<T> getter) throws ServiceException {
        try {
            return service.get(getter);
        } catch (UniformInterfaceException e) {
            throw processCatch(new ServiceException(e));
        } catch (ClientHandlerException e) {
            throw processCatch(new ServiceException(e));
        }
    }
216313
@Override
    public IBasicEntity get(Class<? extends IBasicEntity> type, String key)
            throws CachingException {
        return EntityCachingServiceLocator.getEntityCachingService().get(type, key);
    }
1357962
public synchronized Object get() {
        Object o = null;

        while ((o = tryGet()) == null) {
            try {
                this.wait();
            } catch (final InterruptedException e) {
            }
        }
        return o;
    }
727869
public static <T> Maybe<T> get(String cacheKey, Class<T> clazz) {
        return get(CacheService.CACHE_CONFIG_BEAN, cacheKey, clazz);
    }
1009985
@Override
    public Object get() throws InterruptedException, ExecutionException {
        ScheduledFuture<?> curr;
        synchronized (this.triggerContextMonitor) {
            curr = this.currentFuture;
        }
        return curr.get();
    }
588810
@Override
    public Cache getCache(String cacheName) throws CacheException
    {
        if (this.cache == null)
        {
            this.cache = createCache(cacheName);
        }

        return this.cache;
    }
155554
@Override
    public JSONObject get(String key) {
        return m_publicCache.get().get(ZKUtil.joinZKPath(m_rootNode, key));
    }
72693
public Result<V,E> get(K key) {
		CacheEntry entry = map.get(key);
		if(entry == null) {
			return null;
		} else {
			return entry.getResult();
		}
	}
9252
public V get(K key) {
    V value = _cacheImpl.get(key);
    _requests.incrementAndGet();
    if (value == null) {
      value = _missHandler.load(key);
      _cacheImpl.put(key, value);
      _misses.incrementAndGet();
    } else {
      _hits.incrementAndGet();
    }
    return value;
  }
919025
def get(cls, id=None, condition=None, fields=None, cache=False, engine_name=None, **kwargs):
        
        
        if id is None and condition is None:
            return None
        
        can_cacheable = (cache or getattr(cls, '__cacheable__', None)) and \
            isinstance(id, (int, long, str, unicode))
        if can_cacheable:
            #send 'get_object' topic to get cached object
            obj = dispatch.get(cls, 'get_object', id)
            if obj:
                return obj

        if condition is not None:
            _cond = condition
        else:
            if is_condition(id):
                _cond = id
            else:
                _cond = cls.c[cls._primary_field] == id
            #todo
            # if isinstance(id, (int, long)):
            #     _cond = cls.c.id==id
            # elif isinstance(id, (str, unicode)) and id.isdigit():
            #     _cond = cls.c.id==int(id)
            # else:
            #     _cond = id

        #if there is no cached object, then just fetch from database
        obj = cls.filter(_cond, **kwargs).fields(*(fields or [])).one()
        
        if obj and cache or getattr(cls, '__cacheable__', None):
            dispatch.call(cls, 'set_object', instance=obj)

        return obj
547357
private String getKey(Object key) {
        if (key == null) {
            throw new IllegalArgumentException("Cache key not be null");
        }

        return ObjectUtils.toString(key);
    }