Add an listener that will be invoked when the metadata object becomes invalid.
No expensive operations should be done in these listeners, only other invalidations. If other operations should be done, those should be scheduled in next ticks.
An invalidation listener.
Mark the metadta object as invalid.
This will set the valid
field to false, and invoke the invalidation listeners.
If the metadata object is valid.
If it is invalid, the metadata values should be considered outdated, and a new version should be requested.
Represents the validity of a metadata object.