A flushometer valve is a device that: