Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
*** THIS VERSION UPLOADED FOR USE WITH CEDAR-COMMON, TO AVOID DEPENDENCIES ON GOOGLE CODE-BASED MAVEN REPOSITORIES. *** The simplest convenient interface to the Google App Engine datastore
package com.googlecode.objectify.impl;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.Future;
import com.google.appengine.api.datastore.AsyncDatastoreService;
import com.google.appengine.api.datastore.Transaction;
import com.googlecode.objectify.Key;
import com.googlecode.objectify.ObjectifyFactory;
import com.googlecode.objectify.Query;
import com.googlecode.objectify.Result;
import com.googlecode.objectify.cache.TriggerSuccessFuture;
import com.googlecode.objectify.util.NowFuture;
import com.googlecode.objectify.util.SimpleFutureWrapper;
/**
* Extends the AsyncObjectifyImpl to add a session cache. Note that it only needs
* to override a few key methods.
*
* @author Jeff Schnitzer
*/
public class SessionCachingAsyncObjectifyImpl extends AsyncObjectifyImpl
{
/** Value which gets put in the cache for negative results */
protected static final Object NEGATIVE_RESULT = new Object();
/** The cache is a simple hashmap */
protected Map, Object> cache = new HashMap, Object>();
/**
*/
public SessionCachingAsyncObjectifyImpl(ObjectifyFactory fact, AsyncDatastoreService ds, Transaction txn)
{
super(fact, ds, txn);
}
/* (non-Javadoc)
* @see com.google.code.objectify.AsyncObjectify#get(java.lang.Iterable)
*/
@Override
@SuppressWarnings("unchecked")
public Result