Class RecursiveDelete (3.21.0)

public final class RecursiveDelete

Class used to store state required for running a recursive delete operation. Each recursive delete call should use a new instance of the class.

Inheritance

java.lang.Object > RecursiveDelete

Static Fields

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.

Field Value
Type Description
int

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.

Field Value
Type Description
int

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.

Field Value
Type Description
String

Methods

run()

public ApiFuture<Void> run()
Returns
Type Description
ApiFuture<Void>