public class LocalSessionCacheLoader extends java.lang.Object implements CacheLoader<java.lang.String,javax.servlet.http.HttpSession>, Declarable
Constructor and Description |
---|
LocalSessionCacheLoader(Region<java.lang.String,javax.servlet.http.HttpSession> backingRegion) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Called when the region containing this callback is closed or destroyed, when the cache is
closed, or when a callback is removed from a region using an
AttributesMutator . |
void |
init(java.util.Properties p)
Initializes a user-defined object using the given properties.
|
javax.servlet.http.HttpSession |
load(LoaderHelper<java.lang.String,javax.servlet.http.HttpSession> helper)
Loads a value.
|
public LocalSessionCacheLoader(Region<java.lang.String,javax.servlet.http.HttpSession> backingRegion)
public javax.servlet.http.HttpSession load(LoaderHelper<java.lang.String,javax.servlet.http.HttpSession> helper) throws CacheLoaderException
CacheLoader
Region.get(Object, Object)
that triggered this
load.
load
in interface CacheLoader<java.lang.String,javax.servlet.http.HttpSession>
helper
- a LoaderHelper object that is passed in from cache service and provides access to
the key, region, argument, and netSearch
.null
causes Region.get(Object, Object)
to return
null
.CacheLoaderException
Region.get
public void close()
CacheCallback
AttributesMutator
.
Implementations should cleanup any external resources such as database connections. Any runtime exceptions this method throws will be logged.
It is possible for this method to be called multiple times on a single callback instance, so implementations must be tolerant of this.
close
in interface CacheCallback
RegionService.close()
,
Region.close()
,
Region.localDestroyRegion()
,
Region.destroyRegion()
,
AttributesMutator
public void init(java.util.Properties p)
Declarable
Cache
initialization to fail.init
in interface Declarable
p
- Contains the parameters declared in the declarative xml file.