after 22 years of employment if they terminate my employment what legal rights do I have or do I get any comensation
Your employment can be terminated at any time for a good reason or no reason at all, but not for a bad reason such as discrimination or whistle blowing. Whether you are entitled to any compensation depends upon any contact you have or policy that they have which covers you or your situation. In California employment is considered “at will” which means either the employee or the company can terminate it at any time (absent a contract).