Interface ISMLocking

  • All Known Implementing Classes:
    DefaultISMLocking, FineGrainedISMLocking

    public interface ISMLocking
    ISMLocking defines an interface for a locking strategy of an ItemStateManager.

    An implementation of ISMLocking must meet the following requirements:

    • While a read lock is held for a given item with id 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.
    • While a write lock is held for a given change log 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!
    • While a write lock is held for a given change log 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.
    • While a write lock is held for a change log 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.