Your doctor is going to be your best guide.
It is also dependent on your age and health and the condition of your other joints. Estimate 3-5 days in the hospital. 4-6 weeks for short term recovery (getting around walking with no pain meds). And 3-6 months of rehab to full return. More info is here: http://orthoinfo.Aaos.Org/topic.Cfm?Topic=a00356.