Click or drag to resize

SessionBase Properties

The SessionBase type exposes the following members.

Properties
  NameDescription
Public propertyAddToIndexInSeperateThread
Allow adding objects to indices to be done in a worker thread instead of in main thread.
Public propertyAssumeLocalHost
SessionNoServer ignores DatabaseLocation host value, it assumes localhost, ServerSessionClient does not assume local host, it follows the DatabaseLocation HostName value.
Public propertyStatic memberBaseDatabasePath
If specified boot path (system database path) in session constructor isn't an absolute path then this base path is prefixed to make an absolute path.
Public propertyStatic memberBTreeAddFastTransientBatchSize
Default batch size for BTree AddFast api, initially set to 100
Public propertyStatic memberClearAllCachedObjectsWhenDetectingUpdatedDatabase
By default we clear all cached object when at the beginning of a transaction we detect an updated Database within our cached databases. Same logic is applied when calling ForceDatabaseCacheValidation. We do so because most of the time an object in one database have (strong) references to objects in other databases. If Database A is NOT updated but database B is and an object in database A is cached with a strong reference to an object in database B then our cached object in database A may contain a stale/incorrect reference to object in database B. This is why we, by default, invalidate all cached objects when we detect a modified database within our cached databases. However, if you design your database schema without strong references between databases then you do not need to invalidate cached objects for other databases, only the ones that have changed. By consistently using WeakIOptimizedPersistableReferenceT, BTreeSetKey and BTreeMapKey, Value, you can keep references weak between databases. In such cases, set this property to false.
Public propertyClientCache
Gets the client page cache object
Public propertyDatabaseLocations
Gets the DatabaseLocationsDatabaseLocations for the session.
Public propertyDatabases
Gets a list of the currently opened databases
Public propertyStatic memberDefaultCompressPages
By default false, set to true if you want to change the default for newly created DatabaseLocation.
Public propertyStatic memberDefaultNumberOfObjectsPerPage
Default number of objects per page is 9999
Public propertyStatic memberDefaultStringComparer
Set the StringComparer to use when no application provided comparator is provided. By default we will then use StringComparer.Ordinal.
Public propertyDeletedOids
Collected Oid for unpersisted objects within an update transaction. Ids are only collected if NotifyBeforeCommit is non null.
Public propertyStatic memberDoWindowsAuthentication
By default do not use windows authentication when talking to VelocitydbServer's on other hosts.
Public propertyStatic memberEmbedISerializableLists
Public propertyEnableAutoPageFlush
Pages may be flushed when memory available is low unless you set tis property to false. You would want it to be enabled unless you are trying to share a non SessionNoServerShared session by working on different databases in multiple threads. As in Wikipedia sample application.
Public propertyEnableSyncByTrackingChanges
Enable database and page change tracking. Turn off within an update transaction so that prior change set can be deleted.
Public propertyStatic memberFileBytesChunkSize
When transferring complete files from a server, we send the file bytes in chunks of this size.
Public propertyFileShareReader
FileShare for reader is ReadWrite with optimistic locking; otherwise Read
Public propertyFileShareUpdater
FileShare for updater is Read with optimistic locking; otherwise None
Public propertyInCommit
Indicates if we are within a transaction commit.
Public propertyInMemoryOnly
Gets information about this session, is it an in-memory only session or a session that persists data
Public propertyInTransaction
Indicates if we are within an active transaction.
Public propertyInUpdateTransaction
Indicates if we are within an active update transaction.
Public propertyIsDisposed
Check if session has been disposed
Public propertyStatic memberLocalHost
Get the host name of your local host (the machine you are using)
Public propertyStatic memberMaxStringLengthToIntern
Get the maximum size a string must have before VelocityDB internals interns, Intern(String), string when read from a Database.
Public propertyStatic memberMaxUpdateTransactionLogHistory
Determines max number of UpdateTransaction objects we maintain in update transaction log in Database 0, initially set to 9990
Public propertyStatic memberMinStringLengthToIntern
Get the minimum size a string must have before VelocityDB internals interns, Intern(String), string when read from a Database.
Public propertyNewDatabases
Get a list of all new databases created within this transaction
Public propertyNewOids
Collected Oid for newly persisted objects within an update transaction. Ids are only collected if NotifyBeforeCommit is non null.
Public propertyNotifyBeforeCommit
Set to an Action of your choice if you want to get notified right before commit of an update transaction.
Public propertyObjectCachingDefaultPolicy
Get/Set default value for Cache
Public propertyOptimisticLocking
Is the active Database and/or Page locking using optimistic locking model or not? See https://en.wikipedia.org/wiki/Optimistic_concurrency_control and https://en.wikipedia.org/wiki/Record_locking
Public propertyStrongReferenceDatabaseCaching
Is current session caching Databases using strong references or just by weak references. Set in session constructor or by calling CrossTransactionCacheAllDatabases(Boolean).
Public propertySystemDirectory
Get the path to the directory of the system Databases (0.odb, 1.odb, 2.odb ...) of this session.
Public propertySystemHostName
Get the host name of the system Databases (0.odb, 1.odb, 2.odb ...) of this session.
Public propertyStatic memberTextEncoding
All text encoding is done with utf8
Public propertyTraceDBActivity
Public propertyTraceIndexUsage
If set to true, each time an index (BTreeSet) is used in a LINQ query expression, we output a line about that to the console output.
Public propertyTransactionNumber
Gets the transaction number of the current session
Public propertyUpdatedOids
Collected Oid for updated objects within an update transaction. Ids are only collected if NotifyBeforeCommit is non null.
Public propertyUseExternalStorageApi
This is specifically for Windows Phone API, set to true when you want to access databases from a memory card.
Public propertyWaitForLockMilliseconds
Get/Set the max time waiting for a lock to clear with pessimistic locking
Public propertyWriteToDiskInSeperateDatabaseThreads
Allow object serialization and page writes to happen in worker threads, one per database, instead of in main session thread. AddToIndexInSeperateThread must also be enabled for this to work.
Top
See Also