Click or drag to resize

ServerClientSessionShared Constructor

Creates a new session.

Namespace:  VelocityDb.Session
Assembly:  VelocityDb (in VelocityDb.dll) Version: 11.1.0.0 (11.1)
Syntax
public ServerClientSessionShared(
	string systemDir,
	string systemHost = null,
	int waitForLockMilliseconds = 2000,
	bool optimisticLocking = true,
	bool inMemoryOnly = false,
	bool enablePageCache = true,
	CacheEnum objectCachingDefaultPolicy = CacheEnum.Yes,
	bool enableDatabaseCache = true
)

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