@Documented
@Retention(value=RUNTIME)
@Target(value=TYPE)
public @interface Authoritative
Storable
must come from an
authoritative source. When reading or writing the Storable, the Repository
must guarantee that it is operating on the latest, correct
version of the Storable.
Repositories that cache potentially stale Storables are required to ensure the cache is always up-to-date or bypass the cache altogether. Replicating repositories which may have a propagation delay must always access the master repository.
Repositories which provide eventual consistency but don't rely on a
master must throw UnsupportedTypeException
, as there is no
authoritative source.
Example:
@Authoritative @PrimaryKey("sequenceName") public interface SequenceValue extends Storable<SequenceValue> { String getSequenceName(); void setSequenceName(String name); long getNextValue(); void setNextValue(long value); ... }
Copyright © 2006-2013 Amazon Technologies, Inc.. All Rights Reserved.