/** * Adds some data to the cache, asynchronously. Same as * {@link #putInCache(Class, Object, Object, RequestListener)} with a null * listener. Operation will take place but you won't be notified. * @param clazz * a super class or the class of data. * @param requestCacheKey * the request cache key that data will be stored in. * @param data * the data to store. Maybe null if supported by underlying * ObjectPersister. */ public <T> void putInCache(final Class<? super T> clazz, final Object requestCacheKey, final T data) { putInCache(clazz, requestCacheKey, data, null); }
/** * Adds some data to the cache, asynchronously. Same as * {@link #putInCache(Class, Object, Object, RequestListener)} where the * class used to identify the request is data.getClass() and with a null * listener. Operation will take place but you won't be notified. * @param requestCacheKey * the request cache key that data will be stored in. * @param data * the data to store. Maybe null if supported by underlying * ObjectPersister. */ @SuppressWarnings("unchecked") public <T> void putInCache(final Object requestCacheKey, final T data) { putInCache((Class<T>) data.getClass(), requestCacheKey, data); }
/** * Adds some data to the cache, asynchronously. Same as * {@link #putInCache(Class, Object, Object, RequestListener)} where the * class used to identify the request is data.getClass(). * @param requestCacheKey * the request cache key that data will be stored in. * @param data * the data to store. Maybe null if supported by underlying * ObjectPersister. * @param listener * a listener that will be notified of this request's success or * failure. May be null. */ @SuppressWarnings("unchecked") public <T> void putInCache(final Object requestCacheKey, final T data, RequestListener<T> listener) { putInCache((Class<T>) data.getClass(), requestCacheKey, data, listener); }