ServerClientSession Constructor (String, String, Int32, Boolean, Boolean, Boolean, CacheEnum, Boolean) |
Creates a new session.
Namespace:
VelocityDb.Session
Assembly:
VelocityDb (in VelocityDb.dll) Version: 11.1.0.0 (11.1)
Syntax public ServerClientSession(
string systemDir,
string systemHost = null,
int waitForLockMilliseconds = 2000,
bool optimisticLocking = true,
bool inMemoryOnly = false,
bool enablePageCache = true,
CacheEnum objectCachingDefaultPolicy = CacheEnum.Yes,
bool enableDatabaseCache = true
)
Public Sub New (
systemDir As String,
Optional systemHost As String = Nothing,
Optional waitForLockMilliseconds As Integer = 2000,
Optional optimisticLocking As Boolean = true,
Optional inMemoryOnly As Boolean = false,
Optional enablePageCache As Boolean = true,
Optional objectCachingDefaultPolicy As CacheEnum = CacheEnum.Yes,
Optional enableDatabaseCache As Boolean = true
)
public:
ServerClientSession(
String^ systemDir,
String^ systemHost = nullptr,
int waitForLockMilliseconds = 2000,
bool optimisticLocking = true,
bool inMemoryOnly = false,
bool enablePageCache = true,
CacheEnum objectCachingDefaultPolicy = CacheEnum::Yes,
bool enableDatabaseCache = true
)
new :
systemDir : string *
?systemHost : string *
?waitForLockMilliseconds : int *
?optimisticLocking : bool *
?inMemoryOnly : bool *
?enablePageCache : bool *
?objectCachingDefaultPolicy : CacheEnum *
?enableDatabaseCache : bool
(* Defaults:
let _systemHost = defaultArg systemHost null
let _waitForLockMilliseconds = defaultArg waitForLockMilliseconds 2000
let _optimisticLocking = defaultArg optimisticLocking true
let _inMemoryOnly = defaultArg inMemoryOnly false
let _enablePageCache = defaultArg enablePageCache true
let _objectCachingDefaultPolicy = defaultArg objectCachingDefaultPolicy CacheEnum.Yes
let _enableDatabaseCache = defaultArg enableDatabaseCache true
*)
-> ServerClientSession
Parameters
- systemDir
- Type: SystemString
The startup location directory path (do not use UNC path). Use path as it is on the host owning the directory. Path can be an absolute (full) path or a path relative to s_baseDatabasePath. Change default of s_baseDatabasePath on server by starting server with a forth parameter specifying the base path - systemHost (Optional)
- Type: SystemString
Hostname of the host owning the systemDir - waitForLockMilliseconds (Optional)
- Type: SystemInt32
The desired maximum lock wait time - optimisticLocking (Optional)
- Type: SystemBoolean
Use optimistic locking. With optimistic locking, readers are always permitted and multiple updaters are permitted to update the same Databases/Pages but only the first transaction to commit or flush an updated Database/Page will be successful in making the commit change. Other updaters will get an OptimisticLockingException if they try to commit/flush updates to the same Pages/Database.
See http://en.wikipedia.org/wiki/Optimistic_concurrency_control for further explanation of optimistic locking. If optimistic locking is not enabled then pessimistic locking is used. See: http://en.wikipedia.org/wiki/Concurrency_control - inMemoryOnly (Optional)
- Type: SystemBoolean
Disable all disk access by using this option. Best if used in combination with backup DatabaseLocation. See High availability sample application - enablePageCache (Optional)
- Type: SystemBoolean
If strong reference page caching isn't desired, turn it of by setting to false - objectCachingDefaultPolicy (Optional)
- Type: VelocityDbCacheEnum
Determines default value of Cache - enableDatabaseCache (Optional)
- Type: SystemBoolean
Is this session going to enable strong reference Database caching?
See Also