Looks like setReadOnly() method is not implemented in the library, any idea on how to achieve the result of the below command programatically? mysql> flush tables with read lock;