def add_lock(name, klass)
      raise ArgumentError, "Lock #{name} already defined, please use another name" if locks.key?(name.to_sym)

      new_locks = locks.dup.merge(name.to_sym => klass).freeze
      self.locks = new_locks
    end
def add_lock(name, klass)
      raise ArgumentError, "Lock #{name} already defined, please use another name" if locks.key?(name.to_sym)

      new_locks = locks.dup.merge(name.to_sym => klass).freeze
      self.locks = new_locks
    end
Adds a lock type to the configuration. It will raise if the lock exists already

 @param [String] name the name of the lock
 @param [Class] klass the class describing the lock