Class RecursiveDelete

java.lang.Object
com.google.cloud.firestore.RecursiveDelete

@BetaApi public final class RecursiveDelete extends Object
Class used to store state required for running a recursive delete operation. Each recursive delete call should use a new instance of the class.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    The query limit used for recursive deletes when fetching all descendants of the specified reference to delete.
    static final int
    The number of pending BulkWriter operations at which RecursiveDelete starts the next limit query to fetch descendants.
    static final String
    Datastore allowed numeric IDs where Firestore only allows strings.
  • Method Summary

    Modifier and Type
    Method
    Description
    com.google.api.core.ApiFuture<Void>
    run()
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • REFERENCE_NAME_MIN_ID

      public static final String REFERENCE_NAME_MIN_ID
      Datastore allowed numeric IDs where Firestore only allows strings. Numeric IDs are exposed to Firestore as __idNUM__, so this is the lowest possible negative numeric value expressed in that format.

      This constant is used to specify startAt/endAt values when querying for all descendants in a single collection.

      See Also:
    • MAX_PENDING_OPS

      public static final int MAX_PENDING_OPS
      The query limit used for recursive deletes when fetching all descendants of the specified reference to delete. This is done to prevent the query stream from streaming documents faster than Firestore can delete.
      See Also:
    • MIN_PENDING_OPS

      public static final int MIN_PENDING_OPS
      The number of pending BulkWriter operations at which RecursiveDelete starts the next limit query to fetch descendants. By starting the query while there are pending operations, Firestore can improve BulkWriter throughput. This helps prevent BulkWriter from idling while Firestore fetches the next query.
      See Also:
  • Method Details

    • run

      public com.google.api.core.ApiFuture<Void> run()