Add distributed locking mechanism.