Where are you now? In Canada or somewhere else?
To maintain residency, you don't have to stay in Canada for 2 continuous years. You just need two years of residency (it can be non-continuous) over the last five years. Have you met this residency requirement?