Enable/disable flush from java sdk

Hi, is there a way to enable/disable flush through java sdk ?
Also according to https://developer.couchbase.com/documentation/server/current/clustersetup/bucket-flush.html flush should be avoided.
Is it significantly slower than delete even on smaller buckets (< 100 gbs) ?

I don’t think flush can be enabled / disabled via JDKs. It is highly recommended to make sure FLUSH commands are double checked before execution. This is more of Admin task. This can be done during Bucket creation time or can be edited after the creation.

Here is link to how you can fulsh via JDK. It is clearly mentioned that the command errors out if the flush is disabled.