Capturing sorting, paging, filtering events for custom actions

Hey, do you know if it’s possible to capture one of the following state changes like changing the page, selecting sort column or filter BEFORE the table is rendered? I’d like to introduce my custom functions (SQL queries) to handle these events due to the size of my database. I couldn’t find any way to introduce a “callback” for such events so maybe it’s possible to retrieve the state of table instead?