com.amazon.carbonado
Annotation Type Authoritative


@Documented
@Retention(value=RUNTIME)
@Target(value=TYPE)
public @interface Authoritative

Indicates that all accesses to this 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);

     ...
 }
 

Author:
Brian S O'Neill



Copyright © 2006-2009 Amazon Technologies, Inc.. All Rights Reserved.