They can actually lay almost indefinitely although the number of eggs will slowly dwindle over time.
I've had some for 3 years and they were still laying now and then.
A friend of mine has had one barred rock for six years and she still throws an egg or two out each week.