Class LockSynchronizer


  • public class LockSynchronizer
    extends Object
    This class maintains a Map of LockWrappers and sync the locks among LockWrappers if there is a dependency between them.
    • Constructor Detail

      • LockSynchronizer

        public LockSynchronizer()
    • Method Detail

      • sync

        public void sync​(LockWrapper lockWrapperOne,
                         LockWrapper lockWrapperTwo)
        Ensure that both LockWrappers are sharing the same lock and also update the underneath lock of all the depended LockWrappers of both.
        Parameters:
        lockWrapperOne - lock wrapper one
        lockWrapperTwo - lock wrapper two