Use immutable types in AttributeStore.

Reviewed at https://reviews.apache.org/r/22999/