When to Use Locking
Depending on your application, locking may not be required in all cases. However it is almost always needed.
For most applications, use locking in the following cases:
- With all modes, for reads.
- If you want to read the latest version of a concept in one agent at the same time that another agent might create or update the same concept, mediate the reads through the same global lock that was used when creating or updating the concept. This is done using an event preprocessor and, for Cache Plus Memory, a subscription preprocessor.
- With Concurrent RTC (even with In Memory OM or Memory Only mode), for writes.
- Multiple RTCs could use the same in-memory object, therefore it needs to be protected using a lock. Use a local lock, not a global lock.
Copyright © Cloud Software Group, Inc. All rights reserved.