void close()

Close the sink. No further events can be added after closing.

Source

void close();