/** * Take the cached object with the given type index from cache. * Unlike {@link #getFromCache(org.glassfish.grizzly.ThreadCache.CachedTypeIndex)}, the * object will be removed from cache. * * @param <E> * @param currentThread current {@link Thread} * @param index the cached object type index * @return cached object */ public static <E> E takeFromCache(final Thread currentThread, final CachedTypeIndex<E> index) { if (currentThread instanceof DefaultWorkerThread) { return ((DefaultWorkerThread) currentThread).takeFromCache(index); } else { final ObjectCache genericCache = genericCacheAttr.get(); if (genericCache != null) { return genericCache.take(index); } return null; } }
/** * Take the cached object with the given type index from cache. * Unlike {@link #getFromCache(org.glassfish.grizzly.ThreadCache.CachedTypeIndex)}, the * object will be removed from cache. * * @param <E> * @param currentThread current {@link Thread} * @param index the cached object type index * @return cached object */ public static <E> E takeFromCache(final Thread currentThread, final CachedTypeIndex<E> index) { if (currentThread instanceof DefaultWorkerThread) { return ((DefaultWorkerThread) currentThread).takeFromCache(index); } else { final ObjectCache genericCache = genericCacheAttr.get(); if (genericCache != null) { return genericCache.take(index); } return null; } }
/** * Take the cached object with the given type index from cache. * Unlike {@link #getFromCache(org.glassfish.grizzly.ThreadCache.CachedTypeIndex)}, the * object will be removed from cache. * * @param <E> * @param currentThread current {@link Thread} * @param index the cached object type index * @return cached object */ public static <E> E takeFromCache(final Thread currentThread, final CachedTypeIndex<E> index) { if (currentThread instanceof DefaultWorkerThread) { return ((DefaultWorkerThread) currentThread).takeFromCache(index); } else { final ObjectCache genericCache = genericCacheAttr.get(); if (genericCache != null) { return genericCache.take(index); } return null; } }
/** * Take the cached object with the given type index from cache. * Unlike {@link #getFromCache(org.glassfish.grizzly.ThreadCache.CachedTypeIndex)}, the * object will be removed from cache. * * @param <E> * @param currentThread current {@link Thread} * @param index the cached object type index * @return cached object */ public static <E> E takeFromCache(final Thread currentThread, final CachedTypeIndex<E> index) { if (currentThread instanceof DefaultWorkerThread) { return ((DefaultWorkerThread) currentThread).takeFromCache(index); } else { final ObjectCache genericCache = genericCacheAttr.get(); if (genericCache != null) { return genericCache.take(index); } return null; } }
/** * Take the cached object with the given type index from cache. * Unlike {@link #getFromCache(org.glassfish.grizzly.ThreadCache.CachedTypeIndex)}, the * object will be removed from cache. * * @param <E> * @param currentThread current {@link Thread} * @param index the cached object type index * @return cached object */ public static <E> E takeFromCache(final Thread currentThread, final CachedTypeIndex<E> index) { if (currentThread instanceof DefaultWorkerThread) { return ((DefaultWorkerThread) currentThread).takeFromCache(index); } else { final ObjectCache genericCache = genericCacheAttr.get(); if (genericCache != null) { return genericCache.take(index); } return null; } }
/** * Take the cached object with the given type index from cache. * Unlike {@link #getFromCache(org.glassfish.grizzly.ThreadCache.CachedTypeIndex)}, the * object will be removed from cache. * * @param <E> * @param currentThread current {@link Thread} * @param index the cached object type index * @return cached object */ public static <E> E takeFromCache(final Thread currentThread, final CachedTypeIndex<E> index) { if (currentThread instanceof DefaultWorkerThread) { return ((DefaultWorkerThread) currentThread).takeFromCache(index); } else { final ObjectCache genericCache = genericCacheAttr.get(); if (genericCache != null) { return genericCache.take(index); } return null; } }
/** * Take the cached object with the given type index from cache. * Unlike {@link #getFromCache(org.glassfish.grizzly.ThreadCache.CachedTypeIndex)}, the * object will be removed from cache. * * @param <E> * @param currentThread current {@link Thread} * @param index the cached object type index * @return cached object */ public static <E> E takeFromCache(final Thread currentThread, final CachedTypeIndex<E> index) { if (currentThread instanceof DefaultWorkerThread) { return ((DefaultWorkerThread) currentThread).takeFromCache(index); } else { final ObjectCache genericCache = genericCacheAttr.get(); if (genericCache != null) { return genericCache.take(index); } return null; } }
/** * Take the cached object with the given type index from cache. * Unlike {@link #getFromCache(org.glassfish.grizzly.ThreadCache.CachedTypeIndex)}, the * object will be removed from cache. * * @param <E> * @param currentThread current {@link Thread} * @param index the cached object type index * @return cached object */ public static <E> E takeFromCache(final Thread currentThread, final CachedTypeIndex<E> index) { if (currentThread instanceof DefaultWorkerThread) { return ((DefaultWorkerThread) currentThread).takeFromCache(index); } else { final ObjectCache genericCache = genericCacheAttr.get(); if (genericCache != null) { return genericCache.take(index); } return null; } }
/** * Take the cached object with the given type index from cache. * Unlike {@link #getFromCache(org.glassfish.grizzly.ThreadCache.CachedTypeIndex)}, the * object will be removed from cache. * * @param <E> * @param currentThread current {@link Thread} * @param index the cached object type index * @return cached object */ public static <E> E takeFromCache(final Thread currentThread, final CachedTypeIndex<E> index) { if (currentThread instanceof DefaultWorkerThread) { return ((DefaultWorkerThread) currentThread).takeFromCache(index); } else { final ObjectCache genericCache = genericCacheAttr.get(); if (genericCache != null) { return genericCache.take(index); } return null; } }
/** * Take the cached object with the given type index from cache. * Unlike {@link #getFromCache(org.glassfish.grizzly.ThreadCache.CachedTypeIndex)}, the * object will be removed from cache. * * @param <E> * @param currentThread current {@link Thread} * @param index the cached object type index * @return cached object */ public static <E> E takeFromCache(final Thread currentThread, final CachedTypeIndex<E> index) { if (currentThread instanceof DefaultWorkerThread) { return ((DefaultWorkerThread) currentThread).takeFromCache(index); } else { final ObjectCache genericCache = genericCacheAttr.get(); if (genericCache != null) { return genericCache.take(index); } return null; } }
/** * Take the cached object with the given type index from cache. * Unlike {@link #getFromCache(org.glassfish.grizzly.ThreadCache.CachedTypeIndex)}, the * object will be removed from cache. * * @param <E> * @param currentThread current {@link Thread} * @param index the cached object type index * @return cached object */ public static <E> E takeFromCache(final Thread currentThread, final CachedTypeIndex<E> index) { if (currentThread instanceof DefaultWorkerThread) { return ((DefaultWorkerThread) currentThread).takeFromCache(index); } else { final ObjectCache genericCache = genericCacheAttr.get(); if (genericCache != null) { return genericCache.take(index); } return null; } }
/** * Take the cached object with the given type index from cache. * Unlike {@link #getFromCache(org.glassfish.grizzly.ThreadCache.CachedTypeIndex)}, the * object will be removed from cache. * * @param <E> * @param currentThread current {@link Thread} * @param index the cached object type index * @return cached object */ public static <E> E takeFromCache(final Thread currentThread, final CachedTypeIndex<E> index) { if (currentThread instanceof DefaultWorkerThread) { return ((DefaultWorkerThread) currentThread).takeFromCache(index); } else { final ObjectCache genericCache = genericCacheAttr.get(); if (genericCache != null) { return genericCache.take(index); } return null; } }