Determine Lock class by specifying the implementation class