Interface IObjectStore
Outlines interface for object store
Inherited Members
System.IDisposable.Dispose()
Assembly: NFX.dll
Syntax
public interface IObjectStore : IApplicationComponent, IDisposable, ILocalizedTimeProvider
Properties
ObjectLifeSpanMS
Specifies how long objects live without being touched before becoming evicted from the list
Declaration
int ObjectLifeSpanMS { get; }
Property Value
Type |
Description |
System.Int32 |
|
Methods
CheckIn(Guid, Int32)
Puts an object into store identified by the "key"
Declaration
bool CheckIn(Guid key, int msTimeout = 0)
Parameters
Type |
Name |
Description |
System.Guid |
key |
|
System.Int32 |
msTimeout |
|
Returns
Type |
Description |
System.Boolean |
|
CheckIn(Guid, Object, Int32)
Puts an object reference "value" into store identified by the "key"
Declaration
void CheckIn(Guid key, object value, int msTimeout = 0)
Parameters
Type |
Name |
Description |
System.Guid |
key |
|
System.Object |
value |
|
System.Int32 |
msTimeout |
|
CheckInUnderNewKey(Guid, Guid, Object, Int32)
Puts an object reference "value" into store identified by the "oldKey" under the "newKey".
If oldKey was not checked in, then checks-in under new key as normally would
Declaration
void CheckInUnderNewKey(Guid oldKey, Guid newKey, object value, int msTimeout = 0)
Parameters
Type |
Name |
Description |
System.Guid |
oldKey |
|
System.Guid |
newKey |
|
System.Object |
value |
|
System.Int32 |
msTimeout |
|
CheckOut(Guid)
Retrieves an object reference from the store identified by the "key" or returns null if such object does not exist.
Object is not going to be persisted until it is checked back in the store.
Declaration
object CheckOut(Guid key)
Parameters
Type |
Name |
Description |
System.Guid |
key |
|
Returns
Type |
Description |
System.Object |
|
Delete(Guid)
Deletes object identified by key. Returns true when object was found and marked for deletion
Declaration
Parameters
Type |
Name |
Description |
System.Guid |
key |
|
Returns
Type |
Description |
System.Boolean |
|
Fetch(Guid, Boolean)
Retrieves an object reference from the store identified by the "key" or returns null if such object does not exist.
Object is not going to be persisted as this method provides logical read-only access. If touch=true then object timestamp is updated
Declaration
object Fetch(Guid key, bool touch = false)
Parameters
Type |
Name |
Description |
System.Guid |
key |
|
System.Boolean |
touch |
|
Returns
Type |
Description |
System.Object |
|
UndoCheckout(Guid)
Reverts object state to Normal after the call to Checkout. This way the changes (if any) are not going to be persisted.
Returns true if object was found and checkout canceled. Keep in mind: this method CAN NOT revert inner object state
to its original state if it was changed, it only unmarks object as changed.
This method is reentrant just like the Checkout is
Declaration
bool UndoCheckout(Guid key)
Parameters
Type |
Name |
Description |
System.Guid |
key |
|
Returns
Type |
Description |
System.Boolean |
|
Extension Methods