Provides a pool of sessions for reuse instead of creating new session instances every time a session is needed.
The pooled sessions includes cached databases, pages and objects.
Keep the pool size to a minimum too avoid excessive memory usage.
Inheritance Hierarchy
Namespace:
VelocityDb.Session
Assembly:
VelocityDb (in VelocityDb.dll) Version: 11.1.0.0 (11.1)
Syntax public class SessionPool : IDisposable,
IComparable<SessionPool>
Public Class SessionPool
Implements IDisposable, IComparable(Of SessionPool)
public ref class SessionPool : IDisposable,
IComparable<SessionPool^>
type SessionPool =
class
interface IDisposable
interface IComparable<SessionPool>
end
The SessionPool type exposes the following members.
Constructors
| Name | Description |
---|
| SessionPool |
Creates a session pool, store this pool somewhere where tour application threads can get to it.
|
TopMethods
| Name | Description |
---|
| Dispose |
Disposes all sessions in this pool
|
| FreeSession |
Always call this function so that your session is unlocked and becomes available to others
|
| GetSession |
Get a session locked for use by caller.
|
TopSee Also