From my understanding, as long as the current vaccine is effective against the current/similar strain, immunity will last forever. As strains begin to change it may be necessary to have different types of vaccines, which are predicted yearly and geographically, much like what occurs with the flu.