![JAR search and dependency download from the Maven repository](/logo.png)
org.loom.appengine.scope.MemcacheFlashContext Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of loom-appengine Show documentation
Show all versions of loom-appengine Show documentation
Uploads all artifacts belonging to configuration ':archives'.
The newest version!
package org.loom.appengine.scope;
import org.loom.servlet.names.SessionAttributeNames;
import org.loom.servlet.scope.FlashContext;
import com.google.appengine.api.memcache.Expiration;
import com.google.appengine.api.memcache.MemcacheService;
public class MemcacheFlashContext extends FlashContext {
private transient MemcacheService memcache;
private transient int expirationSeconds;
private static final long serialVersionUID = -2229794470754667710L;
public MemcacheFlashContext(MemcacheService memcache, String id, int expirationSeconds) {
super(id);
this.memcache = memcache;
this.expirationSeconds = expirationSeconds;
}
/**
* Store this context object into memcache. This method should be invoked
* at the end of processinfg the current request.
*/
public void store() {
memcache.put(SessionAttributeNames.FLASH_PREFIX + getId(), this, Expiration.byDeltaSeconds(expirationSeconds));
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy