DataSource.NET
7.1.5.312018
|
An Caplin.DataSource.Cache.Record.ICachedRecord contains a cache of the latest field values of a given subject More...
Properties | |
string | this[string fieldName] [get, set] |
Gets or sets the Type1 field value for the specified fieldname. More... | |
IDictionary< string, ICachedType2Record > | Type2Entries [get] |
Returns a collection of Type2 cache entries for this Record. More... | |
string | Type2IndexField [get, set] |
Gets or sets the type2 index field for all Type2 indices within this record. More... | |
int | Type3CacheSize [get, set] |
Gets or sets the size of the type3 cache (in terms of number of entries) More... | |
IList< ICachedType3Record > | Type3Entries [get] |
Returns a collection of type 3 entries More... | |
Properties inherited from Caplin.DataSource.Cache.ICachedObject | |
string | Subject [get] |
Gets the subject of this Caplin.DataSource.Cache.ICachedObject. More... | |
Additional Inherited Members | |
Public Member Functions inherited from Caplin.DataSource.Cache.ICachedObject | |
IMessage | CreateImageMessage () |
Creates the cache message. More... | |
IMessage | CreateUpdateMessage () |
Creates a message containing the changes since the last time this method was called. More... | |
IMessage | CreateUpdateMessageWithOnlyChangedFields () |
Creates a message containing the changes since the last time this method or CreateDeltaMessage() was called. More... | |
void | Update (IMessage message) |
Updates the cache using information from the supplied Caplin.DataSource.Messaging.IMessage More... | |
An Caplin.DataSource.Cache.Record.ICachedRecord contains a cache of the latest field values of a given subject
An Caplin.DataSource.Cache.Record.ICachedRecord contains a cache of the most recent image as well as a pending changeset which has yet to be applied to the cache. Setting fields using the [] operator affects the pending changeset only with the result that querying using the Caplin.DataSource.Cache.ICachedObject.CreateCacheMessage method will not include any pending field changes. Pending changes are committed using the Caplin.DataSource.Cache.ICachedObject.CreateDeltaMessage method.
The following example demonstrates how to manipulate the cache for a Record subjectype and send out an update to subscribed peers containing the changed fields.
|
getset |
Gets or sets the Type1 field value for the specified fieldname.
Field value to set
When retrieving a field, the [] operator will query first the pending changeset and then the cached values
|
get |
Returns a collection of Type2 cache entries for this Record.
The first parameter is the type2 index name
The returned collection should be locked during any access to it.
|
getset |
Gets or sets the type2 index field for all Type2 indices within this record.
The type2 index fieldname.
|
getset |
Gets or sets the size of the type3 cache (in terms of number of entries)
The size of the type3 cache.
|
get |
Returns a collection of type 3 entries
The entries returned are not writable and the list cannot be altered