add api to set and get shared variable by domain

Change-Id: Icd3f3d82f1e867b313d417a3ee626d126aa79885