Lock user out of JIRA

Hello!

I am working on a plugin for JIRA server/data center and I am interested to find out how does JIRA lock the system when performing re-indexing (JIRA administration -> System -> Advanced -> Indexing -> Select lock JIRA and rebuild index). More specifically, does anyone now of any Java API methods that could facilitate this functionality?

I have tried to find related documentation, but apart form removing permissions from the permissions scheme (which is not ideal), I couldn’t find any other feasible option.

Thank you!