Root / Assembly / ARCCore / Class / PConcurrent
|Description||A (somewhat) thread-safe alternative to PRich which also supports log.|
Note that thread-safety is only guaranteed for writing / reading key and value pairs directly stored within this class, not for writing / reading to objects further down in the hierarchical storage.
Use this base class when you want to ExposingApplicationState throughout the PropertyStream.
(in other words, use this class as a base class for all parts of your application that do some kind of processing.)
By setting the LogContext, every call to TrySetP will be logged.
In addition the metods Log and HandleException get more meaningful, as they will actually distribute the information somewhere, not just hide it withing the object.
The practical consequence of this is that you do not have to write log-code like this:
var c = new Connection()
log("Created new connection with id " + c.Id)
See also ExposingApplicationState.
Note that more memory-hungry due to use of ConcurrentDictionary
|Interfaces||ARCCore.IP; -System.Collections.Generic.IEnumerable`1[ARCCore.IKIP]-; -System.Collections.IEnumerable-|
|LongDescription||Note that this class is normally meaningless to use as base-class for data-objects like 'Customer', 'Order' or similar, because they are by their nature meant to be distributed over the PropertyStream anyway, so changes to them will 'automatically' be logged (that is, sent to the PropertyStream).|
Some inheriting classes in ARCCore are StreamProcessor and ActualConnection.
Generated 2020-10-13 11:11:04.526 UTC