ISMLocking defines an interface for a locking strategy of an {@link ItemStateManager}. An implementation of ISMLocking must meet the following requirements: I an implementation must ensure that no write lock is issued for a change log that contains a reference to an item with id I.C an implementation must ensure that no read lock is issued for an item that is contained in C, unless the current thread is the owner of the write lock!C an implementation must ensure that no write lock is issued for a change log C' that intersects with C. That is both change logs contain a reference to the same item. Please note that an implementation is free to block requests entirely for additional write lock while a write lock is active. It is not a requirement to support concurrent write locks. C, the holder of the write lock (and any related threads) needs to be able to acquire a read lock even if other writers are waiting for the lock. This behaviour must continue also when the write lock has been downgraded. Note that it is not necessary for a holder of a read lock to be able to upgrade to a write lock. | |
| |
| |
| |
| |
| |
| |