sessions / Exports / SessionManagerImpl
Class: SessionManagerImpl
Implements
Table of contents
Constructors
Methods
- createSession
- getSession
- getUserSessions
- removeSession
- pauseSession
- resumeSession
- archiveSession
- getActiveSessionCount
- cleanup
- shutdown
- getStats
Constructors
constructor
• new SessionManagerImpl(config?
): SessionManagerImpl
Parameters
Name | Type |
---|---|
config | SessionManagerConfig |
Returns
Defined in
packages/sessions/src/session-manager/session-manager-impl.ts:15
Methods
createSession
▸ createSession(userId
, config?
): Promise
<Session
>
Parameters
Name | Type |
---|---|
userId | string |
config? | SessionConfig |
Returns
Promise
<Session
>
Implementation of
Defined in
packages/sessions/src/session-manager/session-manager-impl.ts:25
getSession
▸ getSession(sessionId
): undefined
| Session
Parameters
Name | Type |
---|---|
sessionId | string |
Returns
undefined
| Session
Implementation of
Defined in
packages/sessions/src/session-manager/session-manager-impl.ts:47
getUserSessions
▸ getUserSessions(userId
): Session
[]
Parameters
Name | Type |
---|---|
userId | string |
Returns
Session
[]
Implementation of
SessionManager.getUserSessions
Defined in
packages/sessions/src/session-manager/session-manager-impl.ts:51
removeSession
▸ removeSession(sessionId
): Promise
<void
>
Parameters
Name | Type |
---|---|
sessionId | string |
Returns
Promise
<void
>
Implementation of
Defined in
packages/sessions/src/session-manager/session-manager-impl.ts:65
pauseSession
▸ pauseSession(sessionId
): Promise
<void
>
Parameters
Name | Type |
---|---|
sessionId | string |
Returns
Promise
<void
>
Implementation of
Defined in
packages/sessions/src/session-manager/session-manager-impl.ts:87
resumeSession
▸ resumeSession(sessionId
): Promise
<void
>
Parameters
Name | Type |
---|---|
sessionId | string |
Returns
Promise
<void
>
Implementation of
Defined in
packages/sessions/src/session-manager/session-manager-impl.ts:94
archiveSession
▸ archiveSession(sessionId
): Promise
<void
>
Parameters
Name | Type |
---|---|
sessionId | string |
Returns
Promise
<void
>
Implementation of
Defined in
packages/sessions/src/session-manager/session-manager-impl.ts:101
getActiveSessionCount
▸ getActiveSessionCount(): number
Returns
number
Implementation of
SessionManager.getActiveSessionCount
Defined in
packages/sessions/src/session-manager/session-manager-impl.ts:108
cleanup
▸ cleanup(): Promise
<void
>
Returns
Promise
<void
>
Implementation of
Defined in
packages/sessions/src/session-manager/session-manager-impl.ts:119
shutdown
▸ shutdown(): Promise
<void
>
Returns
Promise
<void
>
Implementation of
Defined in
packages/sessions/src/session-manager/session-manager-impl.ts:139
getStats
▸ getStats(): SessionManagerStats
Returns
Defined in
packages/sessions/src/session-manager/session-manager-impl.ts:150