New lock_attr method on Objects to set attribute locks