public class SessionProviderInDb extends java.lang.Object implements SessionProvider, ReadOnlyStatus.IsAware
ApplicationListener, which should be
used to keep the Session instances up-to-date.| Constructor and Description |
|---|
SessionProviderInDb(ome.system.Roles roles,
NodeProvider nodeProvider,
Executor executor) |
| Modifier and Type | Method and Description |
|---|---|
void |
executeCloseSession(java.lang.String uuid)
Loads a session directly, sets its "closed" value and immediately
saves it.
|
ome.model.meta.Session |
executeInternalSession(java.lang.String uuid,
ome.model.meta.Session session) |
long |
executeNextSessionId()
Added as an attempt to cure ticket:1176
|
ome.model.meta.Session |
executeUpdate(ome.system.ServiceFactory sf,
ome.model.meta.Session session,
java.lang.String uuid,
long userId,
java.lang.Long sudoerId) |
ome.model.meta.Session |
findSessionById(long id,
ome.system.ServiceFactory sf)
Retrieves a session by ID.
|
ome.model.meta.Session |
findSessionById(long id,
org.hibernate.Session session)
Retrieves a session by ID.
|
java.lang.Long |
findSessionIdByUuid(java.lang.String uuid) |
java.lang.Long |
findSessionIdByUuid(java.lang.String uuid,
ome.system.ServiceFactory sf) |
boolean |
isReadOnly(ReadOnlyStatus readOnly) |
public SessionProviderInDb(ome.system.Roles roles,
NodeProvider nodeProvider,
Executor executor)
public ome.model.meta.Session executeUpdate(ome.system.ServiceFactory sf,
ome.model.meta.Session session,
java.lang.String uuid,
long userId,
java.lang.Long sudoerId)
executeUpdate in interface SessionProviderpublic void executeCloseSession(java.lang.String uuid)
SessionProviderSessionManager.close(String) and SessionManager.closeAll() methods
since there are other non-explicit ways for a session to be destroyed, such
as a timeout within SessionCache and so this is called from
SessionManagerImpl.onApplicationEvent(org.springframework.context.ApplicationEvent) when a
DestroySessionMessage is received.executeCloseSession in interface SessionProviderpublic ome.model.meta.Session executeInternalSession(java.lang.String uuid,
ome.model.meta.Session session)
executeInternalSession in interface SessionProviderpublic long executeNextSessionId()
SessionProviderexecuteNextSessionId in interface SessionProviderpublic ome.model.meta.Session findSessionById(long id,
org.hibernate.Session session)
SessionProviderfindSessionById in interface SessionProviderid - session ID to lookupsession - active Hibernate sessionpublic ome.model.meta.Session findSessionById(long id,
ome.system.ServiceFactory sf)
SessionProviderfindSessionById in interface SessionProviderid - session ID to lookupsf - active service factorypublic java.lang.Long findSessionIdByUuid(java.lang.String uuid,
ome.system.ServiceFactory sf)
findSessionIdByUuid in interface SessionProviderpublic java.lang.Long findSessionIdByUuid(java.lang.String uuid)
findSessionIdByUuid in interface SessionProviderpublic boolean isReadOnly(ReadOnlyStatus readOnly)
isReadOnly in interface ReadOnlyStatus.IsAwarereadOnly - a read-only status, typically the current one