code: protected void suspendRepository() throws RepositoryException
     {
        SecurityHelper.validateSecurityPermission(JCRRuntimePermissions.MANAGE_REPOSITORY_PERMISSION);
  
        repository.setState(ManageableRepository.SUSPENDED);
     }
docs: Suspend repository which means that allow only read operations.
  All writing threads will wait until resume operations invoked.