public class FineSessionFactory<L> extends Object implements SessionFactory<FineSessionCacheEntry<L>,L>
SessionFactory
for fine granularity sessions.
A given session is mapped to N+1 co-located cache entries, where N is the number of session attributes.
One cache entry containing the session meta data, local context, and the set of attribute names;
and one cache entry per session attribute.Locator.CreateOperation<K,V>, Locator.FindOperation<K,V>
Remover.RemoveOperation<K,V>
Evictor.EvictOperation<K,V>, Evictor.LockingEvictOperation<K,V>
Constructor and Description |
---|
FineSessionFactory(org.infinispan.Cache<String,FineSessionCacheEntry<L>> sessionCache,
org.infinispan.Cache<SessionAttributeCacheKey,MarshalledValue<Object,MarshallingContext>> attributeCache,
CacheInvoker invoker,
SessionContext context,
SessionAttributeMarshaller<Object,MarshalledValue<Object,MarshallingContext>> marshaller,
LocalContextFactory<L> localContextFactory) |
Modifier and Type | Method and Description |
---|---|
ImmutableSession |
createImmutableSession(String id,
FineSessionCacheEntry<L> entry) |
Session<L> |
createSession(String id,
FineSessionCacheEntry<L> entry) |
FineSessionCacheEntry<L> |
createValue(String id)
Creates a value in the cache, if it does not already exist.
|
void |
evict(String id)
Evict the specified item from the cache.
|
FineSessionCacheEntry<L> |
findValue(String id)
Locates the value in the cache with the specified identifier.
|
void |
remove(String id)
Removes the specified entry from the cache.
|
public FineSessionFactory(org.infinispan.Cache<String,FineSessionCacheEntry<L>> sessionCache, org.infinispan.Cache<SessionAttributeCacheKey,MarshalledValue<Object,MarshallingContext>> attributeCache, CacheInvoker invoker, SessionContext context, SessionAttributeMarshaller<Object,MarshalledValue<Object,MarshallingContext>> marshaller, LocalContextFactory<L> localContextFactory)
public Session<L> createSession(String id, FineSessionCacheEntry<L> entry)
createSession
in interface SessionFactory<FineSessionCacheEntry<L>,L>
public ImmutableSession createImmutableSession(String id, FineSessionCacheEntry<L> entry)
createImmutableSession
in interface SessionFactory<FineSessionCacheEntry<L>,L>
public FineSessionCacheEntry<L> findValue(String id)
Locator
findValue
in interface Locator<String,FineSessionCacheEntry<L>>
id
- the cache entry identifierpublic FineSessionCacheEntry<L> createValue(String id)
Locator
createValue
in interface Locator<String,FineSessionCacheEntry<L>>
id
- the cache entry identifier.public void remove(String id)
Remover
Copyright © 2013 JBoss by Red Hat. All rights reserved.