public class CurrentObjectCache<T extends com.cyc.session.CycSession> extends Object
Because thread-local resources can be a source of memory leaks (especially in, e.g., servlets) the goal of this class is to encapsulate all code for managing them in one place; there should be no references to ThreadLocals anywhere else in the Session API. The underlying implementation is a ThreadLocal map, but that could change in the future.
| Constructor and Description |
|---|
CurrentObjectCache() |
| Modifier and Type | Method and Description |
|---|---|
void |
clearCurrentSession() |
T |
getCurrentSession() |
boolean |
hasCurrentSession() |
T |
setCurrentSession(T session) |
public T getCurrentSession()
public T setCurrentSession(T session) throws com.cyc.session.exception.SessionConfigurationException
com.cyc.session.exception.SessionConfigurationExceptionpublic boolean hasCurrentSession()
public void clearCurrentSession()
Copyright © 2013–2018 Cycorp, Inc.. All rights reserved.