What are 'retainers'?

I'm reading a terrific book of employee stories from working on the railroad during the transition era. A lot of the brakemen and firemen talk about setting 'retainers' on the train while in motion. I'm guessing this has something to do with brakes, but I'm not at all clear on what exactly it is or how they are used. Can anyone educate me? :confused: