setRequestedSnapshot method

void setRequestedSnapshot(
  1. String? isRequired
)

Setter method that enables/disables snapshot delivery request for the items in the Subscription.

The snapshot can be requested only if the Subscription mode is MERGE, DISTINCT or COMMAND.

Default "yes" if the Subscription mode is not "RAW", null otherwise.

Lifecycle This method can only be called while the Subscription instance is in its "inactive" state.

Throws IllegalStateException if the Subscription is currently "active".

Throws IllegalArgumentException if the specified value is not "yes" nor "no" nor null nor a valid integer positive number.

Throws IllegalArgumentException if the specified value is not compatible with the mode of the Subscription:

  • In case of a RAW Subscription only null is a valid value;
  • In case of a non-DISTINCT Subscription only null "yes" and "no" are valid values.
  • required "yes"/"no" to request/not request snapshot delivery (the check is case insensitive). If the Subscription mode is DISTINCT, instead of "yes", it is also possible to supply an integer number, to specify the requested length of the snapshot (though the length of the received snapshot may be less than requested, because of insufficient data or server side limits); passing "yes" means that the snapshot length should be determined only by the Server. Null is also a valid value; if specified, no snapshot preference will be sent to the server that will decide itself whether or not to send any snapshot.

  • See ItemUpdate.isSnapshot

Implementation

void setRequestedSnapshot(String? isRequired) {
  _snapshot = isRequired;
}