Class ReservedListDualWriteDao


  • public class ReservedListDualWriteDao
    extends java.lang.Object
    A ReservedList DAO that does dual-write and dual-read against Datastore and Cloud SQL. It still uses Datastore as the primary storage and suppresses any exception thrown by Cloud SQL.

    TODO(b/160993806): Delete this DAO and switch to use the SQL only DAO after migrating to Cloud SQL.

    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.util.Optional<ReservedList> getLatestRevision​(java.lang.String reservedListName)
      Returns the most recent revision of the ReservedList with the specified name, if it exists.
      static void save​(ReservedList reservedList)
      Persist a new reserved list to Cloud SQL.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • save

        public static void save​(ReservedList reservedList)
        Persist a new reserved list to Cloud SQL.
      • getLatestRevision

        public static java.util.Optional<ReservedList> getLatestRevision​(java.lang.String reservedListName)
        Returns the most recent revision of the ReservedList with the specified name, if it exists.